1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
name: Run CI
on:
pull_request:
push:
branches:
- 'main'
concurrency:
group: test-${{ github.ref_name }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Setup Rust
uses: caido/action-setup-rust@v1
with:
cache: false
- name: Run linter
uses: giraffate/clippy-action@871cc4173f2594435c7ea6b0bce499cf6c2164a1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
clippy_flags: --all-features -- -D warnings
reporter: github-pr-review
- name: Run formatter
run: cargo fmt --all -- --check
test:
needs: lint
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Setup Rust
uses: caido/action-setup-rust@v1
with:
cache: false
- name: Run tests
run: cargo test
|