name: Rust CI on: push: paths: - '.github/**' - 'crates/**' pull_request: paths: - '.github/**' - 'crates/**' env: CARGO_TERM_COLOR: always jobs: lint_and_fmt: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: Check format and lint rust crates runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - run: cargo fmt --all -- --check - run: cargo clippy -- -D warnings build_and_test: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: Build and test rust crates runs-on: ubuntu-latest strategy: matrix: toolchain: - stable - beta - nightly steps: - name: Checkout code uses: actions/checkout@v4 - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} - run: cargo build --verbose - run: cargo test --verbose