-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(CI-pr): run unit and documentation tests in stable toolchain job
- Loading branch information
1 parent
362e7ab
commit 45e1970
Showing
1 changed file
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -257,11 +257,11 @@ jobs: | |
tool: cargo-hack | ||
checksum: true | ||
|
||
# - name: Install cargo-nextest | ||
# uses: taiki-e/[email protected] | ||
# with: | ||
# tool: cargo-nextest | ||
# checksum: true | ||
- name: Install cargo-nextest | ||
uses: taiki-e/[email protected] | ||
with: | ||
tool: cargo-nextest | ||
checksum: true | ||
|
||
# - name: Setup Embark Studios lint rules | ||
# shell: bash | ||
|
@@ -341,6 +341,23 @@ jobs: | |
echo '::endgroup::' | ||
done | ||
- name: Run unit and documentation tests | ||
shell: bash | ||
# `cargo` does not allow us to exclude specific features from all features, | ||
# so we're using `cargo metadata` to obtain all features from all workspace crates | ||
# and exclude specific features from the list. | ||
run: | | ||
FEATURES=$(cargo metadata --all-features --format-version 1 | \ | ||
jq -r ' | ||
[ ( .workspace_members | sort ) as $package_ids # Store workspace crate package IDs in `package_ids` array | ||
| .packages[] | select( IN(.id; $package_ids[]) ) | .features | keys[] ] | unique # Select all unique features from all workspace crates | ||
| del( .[] | select( any( . ; . == ("aws_kms", "aws_s3", "release") ) ) ) # Exclude some features from features list | ||
| join(",") # Construct a comma-separated string of features for passing to `cargo` | ||
') | ||
cargo nextest run --config-file .github/nextest.toml --profile ci -E 'kind(lib)' --features "${FEATURES}" | ||
cargo test --doc --features "${FEATURES}" | ||
typos: | ||
name: Spell check | ||
runs-on: ubuntu-latest | ||
|