test.yml (1277B)
1 name: Tests 2 3 on: 4 push: 5 branches-ignore: 6 - dependabot/* 7 pull_request: 8 branches: 9 - master 10 11 jobs: 12 clippy: 13 runs-on: ubuntu-latest 14 steps: 15 - uses: actions/checkout@v4 16 - name: Run clippy action to produce annotations 17 # Don't run on dependabot PRs 18 # https://github.com/actions-rs/clippy-check/issues/2#issuecomment-807852653 19 if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' 20 uses: actions-rs/clippy-check@v1 21 with: 22 token: ${{ secrets.GITHUB_TOKEN }} 23 args: --all-features 24 - name: Run clippy manually without annotations 25 if: github.event.pull_request.head.repo.full_name != github.repository || github.actor == 'dependabot[bot]' 26 uses: actions-rs/cargo@v1 27 with: 28 command: clippy 29 args: --all-targets -- -D warnings 30 formatting: 31 runs-on: ubuntu-latest 32 steps: 33 - uses: actions/checkout@v4 34 - name: Formatting 35 uses: actions-rs/cargo@v1 36 with: 37 command: fmt 38 args: -- --check 39 tests: 40 runs-on: ubuntu-latest 41 steps: 42 - uses: actions/checkout@v4 43 - uses: actions-rs/cargo@v1 44 with: 45 command: test