1+ permissions :
2+ contents : read
13on :
24 push :
35 branches : [main]
46 pull_request :
7+ # Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5
8+ concurrency :
9+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+ cancel-in-progress : true
511name : test
612jobs :
713 required :
1117 matrix :
1218 toolchain : [stable, beta]
1319 steps :
14- - uses : actions/checkout@v3
20+ - uses : actions/checkout@v4
1521 with :
1622 submodules : true
1723 - name : Install ${{ matrix.toolchain }}
@@ -20,20 +26,18 @@ jobs:
2026 toolchain : ${{ matrix.toolchain }}
2127 - name : cargo generate-lockfile
2228 if : hashFiles('Cargo.lock') == ''
23- uses : actions-rs/cargo@v1
24- with :
25- command : generate-lockfile
29+ run : cargo generate-lockfile
2630 # https://twitter.com/jonhoo/status/1571290371124260865
2731 - name : cargo test --locked
28- uses : actions-rs/ cargo@v1
29- with :
30- command : test
31- args : --locked --all-features --all-targets
32+ run : cargo test --locked --all-features --all-targets
33+ # https://github.com/rust-lang/cargo/issues/6669
34+ - name : cargo test --doc
35+ run : cargo test --locked --all-features --doc
3236 minimal :
3337 runs-on : ubuntu-latest
3438 name : ubuntu / stable / minimal-versions
3539 steps :
36- - uses : actions/checkout@v3
40+ - uses : actions/checkout@v4
3741 with :
3842 submodules : true
3943 - name : Install stable
4347 - name : rustup default stable
4448 run : rustup default stable
4549 - name : cargo update -Zminimal-versions
46- uses : actions-rs/cargo@v1
47- with :
48- command : update
49- toolchain : nightly
50- args : -Zminimal-versions
50+ run : cargo +nightly update -Zminimal-versions
5151 - name : cargo test
52- uses : actions-rs/cargo@v1
53- with :
54- command : test
55- args : --locked --all-features --all-targets
52+ run : cargo test --locked --all-features --all-targets
5653 os-check :
5754 runs-on : ${{ matrix.os }}
5855 name : ${{ matrix.os }} / stable
@@ -61,20 +58,21 @@ jobs:
6158 matrix :
6259 os : [macos-latest, windows-latest]
6360 steps :
64- - uses : actions/checkout@v3
61+ # if your project needs OpenSSL, uncommment this to fix Windows builds.
62+ # it's commented out by default as tthe install command takes 5-10m.
63+ # - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
64+ # if: runner.os == 'Windows'
65+ # - run: vcpkg install openssl:x64-windows-static-md
66+ # if: runner.os == 'Windows'
67+ - uses : actions/checkout@v4
6568 with :
6669 submodules : true
6770 - name : Install stable
6871 uses : dtolnay/rust-toolchain@stable
6972 - name : cargo generate-lockfile
7073 if : hashFiles('Cargo.lock') == ''
71- uses : actions-rs/cargo@v1
72- with :
73- command : generate-lockfile
74+ run : cargo generate-lockfile
7475 - name : cargo test
75- uses : actions-rs/cargo@v1
76- with :
77- command : test
78- args : --locked --all-features --all-targets
76+ run : cargo test --locked --all-features --all-targets
7977 # continue using our own coverage.yml for now to get doctest checking
8078 # https://github.com/taiki-e/cargo-llvm-cov/issues/2
0 commit comments