Skip to content

Commit

Permalink
Use ci-test alias (#1112)
Browse files Browse the repository at this point in the history
* use ci-test alias

* Add more aliases

* fix coverage

* try renaming coverage file

* allow pow tests to take longer

* adjustment
  • Loading branch information
Alexandcoats authored Sep 1, 2023
1 parent a8b5390 commit f16a283
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ ci-check-nostd = "check --no-default-features -F serde -p iota-sdk --target risc
ci-check-types = "check --no-default-features -p iota-sdk"

ci-test = "nextest run --all-features --profile ci --cargo-profile ci -p iota-sdk -p iota-sdk-bindings-core"
ci-tangle-test = "nextest run --tests --all-features --run-ignored ignored-only --profile ci --cargo-profile ci -p iota-sdk -p iota-sdk-bindings-core"
ci-coverage = "llvm-cov nextest --lcov --output-path lcov.info --tests -p iota-sdk --all-features --run-ignored all --profile ci"

ci-clippy = "clippy --all-targets --all-features -- -D warnings"

Expand Down
4 changes: 4 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ fail-fast = false
retries = 2
test-threads = "num-cpus"
slow-timeout = { period = "60s", terminate-after = 2 }

[[profile.ci.overrides]]
filter = 'test(/^pow::/)'
slow-timeout = "5m"
4 changes: 3 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches: [develop, production]
paths:
- ".cargo/config.toml"
- ".github/workflows/build-and-test.yml"
- ".github/actions/**"
- "**.rs" # Include all rust files
Expand All @@ -13,6 +14,7 @@ on:
pull_request:
branches: [develop, production]
paths:
- ".cargo/config.toml"
- ".github/workflows/build-and-test.yml"
- ".github/actions/**"
- "**.rs" # Include all rust files
Expand Down Expand Up @@ -50,4 +52,4 @@ jobs:
uses: taiki-e/install-action@nextest

- name: Run tests
run: cargo nextest run --all-features --profile ci --cargo-profile ci -p iota-sdk -p iota-sdk-bindings-core
run: cargo ci-test
13 changes: 2 additions & 11 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches: [develop, production]
paths:
- ".cargo/config.toml"
- ".github/workflows/coverage.yml"
- ".github/actions/**"
- "coverage.sh"
Expand Down Expand Up @@ -54,16 +55,7 @@ jobs:
uses: "./.github/actions/ledger-nano"

- name: Collect coverage data
run: >
cargo llvm-cov nextest
--lcov
--output-path coverage.info
--tests
--package iota-sdk
--all-features
--run-ignored all
--test-threads "num-cpus"
--retries 2
run: cargo ci-coverage

- name: Tear down private tangle
if: always()
Expand All @@ -73,5 +65,4 @@ jobs:
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.info
flag-name: Unit
4 changes: 3 additions & 1 deletion .github/workflows/private-tangle-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches: [develop, production]
paths:
- ".cargo/config.toml"
- ".github/workflows/private-tangle-tests.yml"
- ".github/actions/**"
- "**.rs"
Expand All @@ -15,6 +16,7 @@ on:
pull_request:
branches: [develop, production]
paths:
- ".cargo/config.toml"
- ".github/workflows/private-tangle-tests.yml"
- ".github/actions/**"
- "**.rs"
Expand Down Expand Up @@ -63,7 +65,7 @@ jobs:
uses: "./.github/actions/ledger-nano"

- name: Run tests
run: cargo nextest run --tests --all-features --run-ignored ignored-only --profile ci --cargo-profile ci -p iota-sdk -p iota-sdk-bindings-core
run: cargo ci-tangle-test

- name: Tear down private tangle
if: always()
Expand Down

0 comments on commit f16a283

Please sign in to comment.