Skip to content

Commit

Permalink
[x] move to the latest nextest
Browse files Browse the repository at this point in the history
This version comes with a number of fixes and config file support -- we
can run tests with the CI profile now.

Closes: aptos-labs#10075
  • Loading branch information
sunshowers authored and bors-libra committed Dec 20, 2021
1 parent 9ef01ed commit 37dc834
Show file tree
Hide file tree
Showing 9 changed files with 335 additions and 182 deletions.
9 changes: 9 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[profile.ci]
# Detect flaky tests.
retries = 2
# Show skipped tests in the CI output.
status-level = "skip"
failure-output = "immediate-final"

[profile.ci.junit]
path = "junit.xml"
13 changes: 10 additions & 3 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ defaults:

env:
max_threads: 16
nextest_tries: 3
pre_command: cd /opt/git/diem/

jobs:
Expand Down Expand Up @@ -376,7 +375,7 @@ jobs:
key: ${{ needs.prepare.outputs.changes-target-branch }}
- name: run unit tests
run: |
$pre_command && mkdir -p target/junit-reports && cargo nextest --jobs ${max_threads} --tries ${nextest_tries} --unit --failure-output=immediate-final --changed-since "origin/$TARGET_BRANCH" --junit target/junit-reports/unit-test.xml
$pre_command && cargo nextest --nextest-profile ci --jobs ${max_threads} --test-threads ${max_threads} --unit --changed-since "origin/$TARGET_BRANCH"
env:
TARGET_BRANCH: ${{ needs.prepare.outputs.changes-target-branch }}
- name: run jsonrpc integration tests
Expand All @@ -389,6 +388,10 @@ jobs:
$pre_command && cargo xtest --doc --jobs ${max_threads} --unit --changed-since "origin/$TARGET_BRANCH"
env:
TARGET_BRANCH: ${{ needs.prepare.outputs.changes-target-branch }}
- name: organize unit test results
if: always()
run: |
$pre_command && mkdir -p target/junit-reports && mv target/nextest/ci/junit.xml target/junit-reports/unit-test.xml
- name: upload unit test results
if: always()
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -422,9 +425,13 @@ jobs:
key: ${{ needs.prepare.outputs.changes-target-branch }}
- name: run codegen unit tests
run: |
source $HOME/.profile && $pre_command && mkdir -p target/junit-reports && cargo nextest --jobs ${max_threads} --tries ${nextest_tries} --failure-output=immediate-final -p transaction-builder-generator -p shuffle --unit --changed-since "origin/$TARGET_BRANCH" --run-ignored=ignored-only --junit target/junit-reports/codegen-unit-test.xml
source $HOME/.profile && $pre_command && cargo nextest --nextest-profile ci --jobs ${max_threads} --test-threads ${max_threads} -p transaction-builder-generator -p shuffle --unit --changed-since "origin/$TARGET_BRANCH" --run-ignored=ignored-only
env:
TARGET_BRANCH: ${{ needs.prepare.outputs.changes-target-branch }}
- name: organize codegen test results
if: always()
run: |
$pre_command && mkdir -p target/junit-reports && mv target/nextest/ci/junit.xml target/junit-reports/codegen-unit-test.xml
- name: upload codegen test results
if: always()
uses: actions/upload-artifact@v2
Expand Down
Loading

0 comments on commit 37dc834

Please sign in to comment.