| 1 |
name: Rust |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
pull_request: |
| 8 |
branches: |
| 9 |
- master |
| 10 |
|
| 11 |
jobs: |
| 12 |
check: |
| 13 |
name: Check |
| 14 |
runs-on: ubuntu-latest |
| 15 |
timeout-minutes: 5 |
| 16 |
strategy: |
| 17 |
fail-fast: true |
| 18 |
matrix: |
| 19 |
rustc: [1.67.1, stable] |
| 20 |
steps: |
| 21 |
- uses: actions/checkout@v2 |
| 22 |
- uses: actions-rs/toolchain@v1 |
| 23 |
with: |
| 24 |
profile: minimal |
| 25 |
toolchain: ${{ matrix.rustc }} |
| 26 |
override: true |
| 27 |
- uses: actions-rs/cargo@v1 |
| 28 |
with: |
| 29 |
command: check |
| 30 |
|
| 31 |
test: |
| 32 |
name: Test Suite |
| 33 |
runs-on: ubuntu-latest |
| 34 |
steps: |
| 35 |
- uses: actions/checkout@v2 |
| 36 |
- uses: actions-rs/toolchain@v1 |
| 37 |
with: |
| 38 |
profile: minimal |
| 39 |
toolchain: stable |
| 40 |
override: true |
| 41 |
- uses: actions-rs/cargo@v1 |
| 42 |
with: |
| 43 |
command: test |
| 44 |
|
| 45 |
fmt: |
| 46 |
name: Rustfmt |
| 47 |
runs-on: ubuntu-latest |
| 48 |
steps: |
| 49 |
- uses: actions/checkout@v2 |
| 50 |
- uses: actions-rs/toolchain@v1 |
| 51 |
with: |
| 52 |
profile: minimal |
| 53 |
toolchain: stable |
| 54 |
override: true |
| 55 |
components: rustfmt |
| 56 |
- uses: actions-rs/cargo@v1 |
| 57 |
with: |
| 58 |
command: fmt |
| 59 |
args: --all -- --check |
| 60 |
|
| 61 |
clippy: |
| 62 |
name: Clippy |
| 63 |
runs-on: ubuntu-latest |
| 64 |
steps: |
| 65 |
- uses: actions/checkout@v2 |
| 66 |
- uses: actions-rs/toolchain@v1 |
| 67 |
with: |
| 68 |
profile: minimal |
| 69 |
toolchain: stable |
| 70 |
override: true |
| 71 |
components: clippy |
| 72 |
- name: Run cargo clippy |
| 73 |
uses: actions-rs/clippy-check@v1 |
| 74 |
with: |
| 75 |
token: ${{ secrets.GITHUB_TOKEN }} |
| 76 |
|