Enable all cargo tests in CI #664
Workflow file for this run
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: Rust | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
CARGO_INCREMENTAL: false | |
jobs: | |
compiler-tests: | |
name: Compiler Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# just triggers rustup to download the toolchain | |
- name: Cache Toolchain | |
uses: actions/cache@v3 | |
with: | |
path: ~/.rustup | |
key: ${{ runner.os }}-rust-toolchain-${{ hashFiles('rust-toolchain.toml') }} | |
- name: Cache Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-rust-deps-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | |
- name: Flowistry Tests | |
run: cargo test -p flowistry_pdg -p flowistry_pdg_construction | |
- name: Report disk usage | |
run: "du -h -d 2 target | sort -h" | |
- name: Racing tests together | |
run: cargo test --test async_tests -- selector | |
- name: Report disk usage | |
run: "du -h -d 2 target | sort -h" | |
- name: Paralegal flow tests | |
run: cargo test -p paralegal-flow -p paralegal-spdg | |
- name: Report disk usage | |
run: "du -h -d 2 target | sort -h" | |
- name: Paralegal Policy Tests | |
run: cargo test -p paralegal-policy | |
format-check: | |
name: Format Control | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# just triggers rustup to download the toolchain | |
- name: Cache Toolchain | |
uses: actions/cache@v3 | |
with: | |
path: ~/.rustup | |
key: ${{ runner.os }}-rust-toolchain-${{ hashFiles('rust-toolchain.toml') }} | |
- name: Install cargo-make | |
run: rustup run stable cargo install --force --debug cargo-make | |
- name: Run checks | |
run: cargo make format-check-all | |
linting: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache Toolchain | |
uses: actions/cache@v3 | |
with: | |
path: ~/.rustup | |
key: ${{ runner.os }}-rust-toolchain-${{ hashFiles('rust-toolchain.toml') }} | |
- name: Cache Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-rust-deps-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | |
- name: Install cargo-make | |
run: rustup run stable cargo install --force --debug cargo-make | |
- name: Here come the complaints | |
run: cargo make clippy-check-all | |
documentation: | |
name: Documentation Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache Toolchain | |
uses: actions/cache@v3 | |
with: | |
path: ~/.rustup | |
key: ${{ runner.os }}-rust-toolchain-${{ hashFiles('rust-toolchain.toml') }} | |
- name: Cache Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-rust-deps-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | |
- name: Install cargo-make | |
run: rustup run stable cargo install --force --debug cargo-make | |
- name: Here come the complaints | |
run: cargo make doc-check |