Skip to content

status-checks

status-checks #2021

Workflow file for this run

on:
push:
branches: [main]
pull_request: {}
workflow_dispatch: {}
merge_group:
branches:
- main
- release
name: status-checks
jobs:
lint_and_format:
name: Lint and Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 🦀 Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: ⚡ Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo
- name: Install just
uses: baptiste0928/cargo-install@v3
with:
crate: just
- name: Run lint
run: just lint
security_audit:
name: Security Audit
runs-on: ubuntu-latest
permissions:
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
testing:
name: Run Tests
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: 🦀 Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: ⚡ Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo
- name: Install just
uses: baptiste0928/cargo-install@v3
with:
crate: just
- name: Install wasm-pack
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-llvm-cov
- name: Install Java 17
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 17
- name: Install Dotnet 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Try to fix .NET issue
# https://github.com/dotnet/runtime/issues/91987
run: |
sudo rm -rf /tmp/.dotnet
- name: Tests with Coverage
run: just test-cov
- name: Coverage Report
run: |
cargo llvm-cov report --hide-instantiations --ignore-filename-regex '^(tests/.*\.rs|.*/tests\.rs)$' --codecov --output-path target/codecov.json
cargo llvm-cov report --hide-instantiations --ignore-filename-regex '^(tests/.*\.rs|.*/tests\.rs)$' --html --output-dir target/coverage
cargo llvm-cov report --hide-instantiations --ignore-filename-regex '^(tests/.*\.rs|.*/tests\.rs)$'
- name: Upload Coverage to CodeCov
uses: codecov/[email protected]
with:
use_oidc: true
fail_ci_if_error: true
files: target/codecov.json
name: codecov.json