diff options
Diffstat (limited to '.github/workflows/rust.yml')
| -rw-r--r-- | .github/workflows/rust.yml | 67 |
1 files changed, 56 insertions, 11 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index acee126..18ac596 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml | |||
| @@ -1,22 +1,67 @@ | |||
| 1 | name: Rust | 1 | name: Rust |
| 2 | 2 | ||
| 3 | on: | 3 | on: [push, pull_request] |
| 4 | push: | ||
| 5 | branches: [ main ] | ||
| 6 | pull_request: | ||
| 7 | branches: [ main ] | ||
| 8 | 4 | ||
| 9 | env: | 5 | env: |
| 10 | CARGO_TERM_COLOR: always | 6 | CARGO_TERM_COLOR: always |
| 11 | 7 | ||
| 12 | jobs: | 8 | jobs: |
| 13 | build: | 9 | check: |
| 10 | name: Check | ||
| 11 | runs-on: ubuntu-latest | ||
| 12 | steps: | ||
| 13 | - uses: actions/checkout@v2 | ||
| 14 | - uses: actions-rs/toolchain@v1 | ||
| 15 | with: | ||
| 16 | profile: minimal | ||
| 17 | toolchain: nightly | ||
| 18 | override: true | ||
| 19 | - uses: actions-rs/cargo@v1 | ||
| 20 | with: | ||
| 21 | command: check | ||
| 14 | 22 | ||
| 23 | test: | ||
| 24 | name: Test Suite | ||
| 15 | runs-on: ubuntu-latest | 25 | runs-on: ubuntu-latest |
| 26 | steps: | ||
| 27 | - uses: actions/checkout@v2 | ||
| 28 | - uses: actions-rs/toolchain@v1 | ||
| 29 | with: | ||
| 30 | profile: minimal | ||
| 31 | toolchain: nightly | ||
| 32 | override: true | ||
| 33 | - uses: actions-rs/cargo@v1 | ||
| 34 | with: | ||
| 35 | command: test | ||
| 16 | 36 | ||
| 37 | fmt: | ||
| 38 | name: Rustfmt | ||
| 39 | runs-on: ubuntu-latest | ||
| 40 | steps: | ||
| 41 | - uses: actions/checkout@v2 | ||
| 42 | - uses: actions-rs/toolchain@v1 | ||
| 43 | with: | ||
| 44 | profile: minimal | ||
| 45 | toolchain: nightly | ||
| 46 | override: true | ||
| 47 | - run: rustup component add rustfmt | ||
| 48 | - uses: actions-rs/cargo@v1 | ||
| 49 | with: | ||
| 50 | command: fmt | ||
| 51 | args: --all -- --check | ||
| 52 | |||
| 53 | clippy: | ||
| 54 | name: Clippy | ||
| 55 | runs-on: ubuntu-latest | ||
| 17 | steps: | 56 | steps: |
| 18 | - uses: actions/checkout@v2 | 57 | - uses: actions/checkout@v2 |
| 19 | - name: Build | 58 | - uses: actions-rs/toolchain@v1 |
| 20 | run: cargo +nightly build --verbose | 59 | with: |
| 21 | - name: Run tests | 60 | profile: minimal |
| 22 | run: cargo +nightly test --verbose | 61 | toolchain: nightly |
| 62 | override: true | ||
| 63 | - run: rustup component add clippy | ||
| 64 | - uses: actions-rs/cargo@v1 | ||
| 65 | with: | ||
| 66 | command: clippy | ||
| 67 | args: -- -D warnings | ||
