| 1 |
on: push |
| 2 |
|
| 3 |
name: Continuous integration |
| 4 |
|
| 5 |
env: |
| 6 |
CARGO_TERM_COLOR: always |
| 7 |
|
| 8 |
jobs: |
| 9 |
ci: |
| 10 |
runs-on: ubuntu-latest |
| 11 |
strategy: |
| 12 |
matrix: |
| 13 |
rust: |
| 14 |
- stable |
| 15 |
- beta |
| 16 |
- nightly |
| 17 |
|
| 18 |
steps: |
| 19 |
- uses: actions/checkout@v2 |
| 20 |
|
| 21 |
- uses: actions-rs/toolchain@v1 |
| 22 |
with: |
| 23 |
profile: minimal |
| 24 |
toolchain: ${{ matrix.rust }} |
| 25 |
override: true |
| 26 |
components: rustfmt, clippy |
| 27 |
|
| 28 |
- uses: actions-rs/cargo@v1 |
| 29 |
with: |
| 30 |
command: build |
| 31 |
|
| 32 |
- uses: actions-rs/cargo@v1 |
| 33 |
with: |
| 34 |
command: test |
| 35 |
|
| 36 |
- uses: actions-rs/cargo@v1 |
| 37 |
if: ${{ matrix.rust == 'stable' }} |
| 38 |
with: |
| 39 |
command: fmt |
| 40 |
args: --all -- --check |
| 41 |
|
| 42 |
- uses: actions-rs/cargo@v1 |
| 43 |
with: |
| 44 |
command: clippy |
| 45 |
|
| 46 |
- uses: EmbarkStudios/cargo-deny-action@v1 |