|
7 | 7 | - main |
8 | 8 |
|
9 | 9 | name: CI |
| 10 | +env: |
| 11 | + RUSTFLAGS: -D warnings |
| 12 | + CARGO_TERM_COLOR: always |
10 | 13 |
|
11 | 14 | jobs: |
12 | 15 | lint: |
13 | 16 | name: Lint |
14 | 17 | runs-on: ubuntu-latest |
15 | | - env: |
16 | | - RUSTFLAGS: -D warnings |
17 | 18 | steps: |
18 | 19 | - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 |
19 | 20 | - uses: dtolnay/rust-toolchain@stable |
20 | 21 | with: |
21 | 22 | components: rustfmt, clippy |
22 | 23 | - uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2 |
23 | | - - name: Lint (rustfmt) |
24 | | - run: cargo xfmt --check |
25 | 24 | - name: Lint (clippy) |
26 | 25 | run: cargo clippy --all-features --all-targets |
| 26 | + - name: Lint (rustfmt) |
| 27 | + run: cargo xfmt --check |
| 28 | + - name: Install cargo readme |
| 29 | + uses: taiki-e/install-action@834a7b93e0c678fb40309ee0e36546336d5c6ea7 # v2 |
| 30 | + with: |
| 31 | + tool: cargo-readme |
| 32 | + - name: Run cargo readme |
| 33 | + run: ./scripts/regenerate-readmes.sh |
| 34 | + - name: Check for differences |
| 35 | + run: git diff --exit-code |
| 36 | + |
| 37 | + build-rustdoc: |
| 38 | + name: Build documentation |
| 39 | + runs-on: ${{ matrix.os }} |
| 40 | + strategy: |
| 41 | + matrix: |
| 42 | + os: [ubuntu-latest] |
| 43 | + fail-fast: false |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 |
| 46 | + - uses: dtolnay/rust-toolchain@stable |
| 47 | + with: |
| 48 | + components: rustfmt, clippy |
| 49 | + - uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2 |
| 50 | + - name: Build rustdoc |
| 51 | + run: cargo doc --all-features |
27 | 52 |
|
28 | 53 | build: |
29 | 54 | name: Build and test |
30 | 55 | runs-on: ${{ matrix.os }} |
31 | 56 | strategy: |
32 | 57 | matrix: |
33 | | - os: [ ubuntu-latest, macos-latest, windows-latest ] |
| 58 | + os: |
| 59 | + - ubuntu-latest |
34 | 60 | # 1.60 is the MSRV |
35 | | - rust-version: [ "1.60", stable ] |
| 61 | + rust-version: ["1.60", stable] |
36 | 62 | fail-fast: false |
37 | | - env: |
38 | | - RUSTFLAGS: -D warnings |
39 | 63 | steps: |
40 | 64 | - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 |
41 | | - - uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1 |
| 65 | + - uses: dtolnay/rust-toolchain@master |
42 | 66 | with: |
43 | 67 | toolchain: ${{ matrix.rust-version }} |
44 | 68 | - uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2 |
| 69 | + with: |
| 70 | + key: ${{ matrix.rust-version }} |
45 | 71 | - name: Build |
46 | 72 | run: cargo build |
47 | | - - name: Install nextest |
| 73 | + - name: Install latest nextest release |
48 | 74 | uses: taiki-e/install-action@nextest |
49 | | - - name: Test |
50 | | - run: cargo nextest run --all-features |
51 | | - - name: Delete Cargo.lock and test against latest versions |
52 | | - if: matrix.rust-version == 'stable' |
53 | | - run: | |
54 | | - rm Cargo.lock |
55 | | - cargo nextest run --all-features |
| 75 | + - name: Build datatest-stable |
| 76 | + run: cargo build |
| 77 | + - name: Run tests |
| 78 | + run: cargo nextest run |
0 commit comments