| 1 |
name: ci |
| 2 |
|
| 3 |
on: |
| 4 |
pull_request: {} |
| 5 |
push: |
| 6 |
branches: |
| 7 |
- master |
| 8 |
schedule: |
| 9 |
- cron: '0 0 * * 0' |
| 10 |
|
| 11 |
jobs: |
| 12 |
lint: |
| 13 |
runs-on: ubuntu-latest |
| 14 |
steps: |
| 15 |
- uses: actions/checkout@v3 |
| 16 |
- uses: dtolnay/rust-toolchain@master |
| 17 |
with: |
| 18 |
toolchain: stable |
| 19 |
components: rustfmt, clippy |
| 20 |
- run: cargo clippy -- -D warnings |
| 21 |
- run: cargo fmt --all -- --check |
| 22 |
build: |
| 23 |
runs-on: ubuntu-latest |
| 24 |
strategy: |
| 25 |
matrix: |
| 26 |
rust: |
| 27 |
- 1.65.0 |
| 28 |
- stable |
| 29 |
- beta |
| 30 |
steps: |
| 31 |
- uses: actions/checkout@v3 |
| 32 |
- uses: dtolnay/rust-toolchain@master |
| 33 |
with: |
| 34 |
toolchain: ${{ matrix.rust }} |
| 35 |
- run: cargo check |
| 36 |
- run: cargo build |
| 37 |
test: |
| 38 |
runs-on: ubuntu-latest |
| 39 |
strategy: |
| 40 |
matrix: |
| 41 |
rust: |
| 42 |
- stable |
| 43 |
- beta |
| 44 |
steps: |
| 45 |
- uses: actions/checkout@v3 |
| 46 |
- uses: dtolnay/rust-toolchain@master |
| 47 |
with: |
| 48 |
toolchain: ${{ matrix.rust }} |
| 49 |
- run: cargo test |