fork/eza

git clone https://git.julia.blue/fork/eza

Christina SørensenMerge pull request #487 from dundargoc/treat-warnings-as-errors55c3d084

v0.15.3
1.3 KiB59 linesraw
1name: Unit tests
2
3on:
4  push:
5    branches: [ main ]
6    paths:
7      - '.github/workflows/unit-tests.yml'
8      - 'src/**'
9      - 'Cargo.*'
10      - build.rs
11  pull_request:
12    branches: [ main ]
13    paths:
14      - '.github/workflows/unit-tests.yml'
15      - 'src/**'
16      - 'Cargo.*'
17      - build.rs
18
19concurrency:
20  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
21  cancel-in-progress: true
22
23env:
24  CARGO_TERM_COLOR: always
25  RUSTFLAGS: --deny warnings
26
27jobs:
28  unit-tests:
29    runs-on: ${{ matrix.os }}
30
31    continue-on-error: ${{ matrix.rust == 'nightly' }}
32
33    strategy:
34      matrix:
35        os: [ubuntu-latest, macos-latest, windows-latest]
36        rust: [1.70.0, stable, beta, nightly]
37
38    steps:
39      - name: Checkout repository
40        uses: actions/checkout@v4
41
42      - run: rustup toolchain install ${{ matrix.rust }} --profile minimal
43      - uses: Swatinem/rust-cache@v2
44
45      - name: Install cargo-hack
46        uses: nick-fields/retry@v2
47        with:
48          timeout_minutes: 5
49          max_attempts: 5
50          command: cargo install cargo-hack
51
52      - name: Run rustfmt checks
53        run: cargo fmt --check
54
55      - name: Run clippy lints
56        run: cargo clippy -- -D warnings 
57
58      - name: Run unit tests
59        run: cargo hack test