-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devtools: remove and replace x (#2042)
- Loading branch information
Showing
52 changed files
with
68 additions
and
6,174 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 |
---|---|---|
@@ -1,10 +1,20 @@ | ||
[alias] | ||
x = "run --package x --bin x --" | ||
xcheck = "run --package x --bin x -- check" | ||
xclippy = "run --package x --bin x -- clippy" | ||
xfmt = "fmt" | ||
xfix = "run --package x --bin x -- fix" | ||
xtest = "run --package x --bin x -- test" | ||
xlint = "run --package x --bin x -- lint" | ||
xbuild = "run --package x --bin x -- build" | ||
nextest = "run --package x --bin x -- nextest" | ||
xclippy = [ | ||
"clippy", | ||
"--workspace", | ||
"--", | ||
"-Dwarnings", | ||
"-Wclippy::all", | ||
"-Aclippy::unit_arg", | ||
"-Aclippy::eval-order-dependence", | ||
"-Aclippy::new-without-default", | ||
"-Aclippy::rc_buffer", | ||
"-Aclippy::upper_case_acronyms", | ||
"-Aclippy::len-without-is-empty", | ||
"-Aclippy::from-iter-instead-of-collect", | ||
"-Aclippy::while-let-on-iterator", | ||
"-Aclippy::bool-assert-comparison", | ||
"-Aclippy::needless-collect", | ||
"-Aclippy::enum-variant-names", | ||
"-Aclippy::self-named-constructors", | ||
] |
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ env: | |
HAS_BUILDPULSE_SECRETS: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID != '' && secrets.BUILDPULSE_SECRET_ACCESS_KEY != '' }} | ||
HAS_DATADOG_SECRETS: ${{ secrets.DD_API_KEY != '' }} | ||
CARGO_INCREMENTAL: "0" | ||
CARGO_TERM_COLOR: always | ||
|
||
# cancel redundant builds | ||
concurrency: | ||
|
@@ -120,30 +121,33 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/rust-setup | ||
- run: cargo x lint | ||
- run: cargo xclippy --workspace --all-targets | ||
- uses: pre-commit/[email protected] | ||
- run: cargo xclippy | ||
- run: cargo fmt --check | ||
- run: cargo install cargo-sort | ||
- run: cargo sort --grouped --check --workspace | ||
|
||
rust-unit-xtest: | ||
rust-doc-test: | ||
runs-on: high-perf-docker | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # get all the history because cargo xtest --change-since origin/main requires it. | ||
- uses: ./.github/actions/rust-setup | ||
- run: cargo xtest --doc --unit --changed-since "origin/main" --exclude aptos-node-checker | ||
- run: cargo test --doc --workspace --exclude aptos-node-checker | ||
|
||
rust-unit-nextest: | ||
rust-unit-test: | ||
runs-on: high-perf-docker | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
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 --unit --exclude backup-cli --changed-since "origin/main" | ||
- uses: taiki-e/[email protected] | ||
with: | ||
tool: nextest | ||
- run: cargo nextest run --profile ci --workspace --exclude smoke-test --exclude backup-cli --exclude testcases | ||
env: | ||
INDEXER_DATABASE_URL: postgresql://postgres@localhost/postgres | ||
|
||
|
@@ -167,16 +171,18 @@ jobs: | |
service: rust-unit-nextest | ||
files: target/nextest/ci/junit.xml | ||
|
||
rust-e2e-test: | ||
rust-smoke-test: | ||
runs-on: high-perf-docker | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/rust-setup | ||
- run: docker run --detach -p 5432:5432 cimg/postgres:14.2 | ||
- uses: taiki-e/[email protected] | ||
with: | ||
tool: nextest | ||
# --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 --package smoke-test --test-threads 6 --retries 3 | ||
- run: cargo nextest run --profile ci --package smoke-test --test-threads 6 --retries 3 | ||
env: | ||
RUST_BACKTRACE: full | ||
INDEXER_DATABASE_URL: postgresql://postgres@localhost/postgres | ||
|
||
- name: Upload test results to BuildPulse for flaky test detection | ||
|
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
files: \.(rs|move)$ | ||
- id: end-of-file-fixer | ||
files: \.(rs|move)$ | ||
- id: check-added-large-files | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks | ||
rev: v1.3.0 | ||
hooks: | ||
- id: insert-license | ||
files: \.rs$ | ||
args: | ||
- --license-filepath | ||
- devtools/assets/license_header.txt | ||
- --comment-style | ||
- // |
Oops, something went wrong.