Last active
October 14, 2023 17:58
-
-
Save m00nwtchr/cf6c8f7d1460c5ac002849e2cc7bc25a to your computer and use it in GitHub Desktop.
Rust Actions Template
This file contains hidden or 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: | |
| pull_request: | |
| push: | |
| branches: ["master"] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| name: Test Rust ${{ matrix.rust }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { rust: stable, os: ubuntu-latest } | |
| - { rust: stable, os: macos-latest } | |
| - { rust: stable, os: windows-latest } | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: hecrj/setup-rust-action@v1 | |
| with: | |
| rust-version: ${{ matrix.rust }} | |
| - run: cargo test --verbose --workspace --all-features | |
| clippy: | |
| name: Lint with Clippy | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTFLAGS: -Dwarnings | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: hecrj/setup-rust-action@v2 | |
| with: | |
| components: clippy | |
| - run: cargo clippy --workspace --all-targets --verbose --all-features | |
| rustfmt: | |
| name: Verify code formatting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: hecrj/setup-rust-action@v2 | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all -- --check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment