Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cicd: set test-threads to 16 and add retries to reduce flaky failures #1507

Merged
merged 1 commit into from
Jun 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ on:

env:
HAS_BUILDPULSE_SECRETS: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID != '' && secrets.BUILDPULSE_SECRET_ACCESS_KEY != '' }}
CARGO_INCREMENTAL: "0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slightly faster builds and smaller cache sizes when disabling incremental compilation as described here https://matklad.github.io/2021/09/04/fast-rust-builds.html


# cancel redundant builds
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

canceling redundant builds to reduce load on CI


jobs:
scripts-lint:
Expand Down Expand Up @@ -135,7 +141,7 @@ jobs:
fetch-depth: 0 # get all the history because cargo xtest --change-since origin/main requires it.
- uses: ./.github/actions/rust-setup
- run: docker run --detach -p 5432:5432 cimg/postgres:14.2
- run: cargo nextest --nextest-profile ci --partition hash:1/1 --unit --exclude backup-cli --changed-since "origin/main"
- run: cargo nextest --nextest-profile ci --test-threads 16 --retries 2 --unit --exclude backup-cli --changed-since "origin/main"
env:
INDEXER_DATABASE_URL: postgresql://postgres@localhost/postgres

Expand All @@ -158,7 +164,7 @@ jobs:
- uses: ./.github/actions/rust-setup
- run: docker run --detach -p 5432:5432 cimg/postgres:14.2
# --test-threads is intentionally set to reduce resource contention in ci jobs. Increasing this, increases job failures and retries.
- run: cargo nextest --nextest-profile ci --partition hash:1/1 --package smoke-test --test-threads 6 --retries 3
- run: cargo nextest --nextest-profile ci --package smoke-test --test-threads 6 --retries 3
env:
RUST_BACKTRACE: full
INDEXER_DATABASE_URL: postgresql://postgres@localhost/postgres
Expand Down