Add tests for builtin macros #2392
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- release/* | |
pull_request: | |
merge_group: | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: ${{ github.head_ref != 'main' }} | |
jobs: | |
build-test: | |
name: build tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- uses: taiki-e/install-action@nextest | |
- name: nextest archive | |
run: cargo nextest archive --workspace --all-features --cargo-profile ci --archive-file 'nextest-archive.tar.zst' | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: nextest-archive | |
path: nextest-archive.tar.zst | |
test: | |
name: test ${{ matrix.partition }}/4 | |
runs-on: ubuntu-latest | |
needs: | |
- build-test | |
strategy: | |
fail-fast: false | |
matrix: | |
partition: [1, 2, 3, 4] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: software-mansion/setup-scarb@v1 | |
with: | |
cache: false | |
- uses: taiki-e/install-action@nextest | |
- uses: actions/download-artifact@v4 | |
with: | |
name: nextest-archive | |
- name: nextest partition ${{ matrix.partition }}/4 | |
run: | | |
cargo nextest run | |
--partition 'count:${{ matrix.partition }}/4' | |
--archive-file 'nextest-archive.tar.zst' | |
--all-features | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo fmt --check | |
- run: cargo lint | |
env: | |
# Make sure CI fails on all warnings, including Clippy lints. | |
RUSTFLAGS: "-Dwarnings" | |
- run: cargo docs | |
env: | |
# Make sure CI fails on all warnings, including Clippy lints. | |
RUSTDOCFLAGS: "-Dwarnings" | |
- uses: taiki-e/install-action@cargo-machete | |
- run: cargo machete |