1313 RUST_BACKTRACE : 1
1414 CARGO_TERM_COLOR : always
1515 CLICOLOR : 1
16+ CARGO_INCREMENTAL : 0
17+ RUST_TOOLCHAIN_STABLE : " 1.98" # STABLE
1618
1719concurrency :
1820 group : " ${{ github.workflow }}-${{ github.ref }}"
@@ -43,13 +45,17 @@ jobs:
4345 CARGO_PROFILE_DEV_DEBUG : line-tables-only
4446 steps :
4547 - name : Checkout repository
46- uses : actions/checkout@v7
48+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
49+ with :
50+ persist-credentials : false
4751 - name : Install Rust
48- uses : dtolnay/rust-toolchain@stable
52+ run : rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
53+ - name : Initialize cache
54+ uses : Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
55+ - name : Install cargo-hack
56+ uses : taiki-e/install-action@37f7c5781271959fb65b6b35224e28652ff2b63d # v2.87.0
4957 with :
50- toolchain : ${{ matrix.rust }}
51- - uses : Swatinem/rust-cache@v2
52- - uses : taiki-e/install-action@cargo-hack
58+ tool : cargo-hack
5359 - name : Build
5460 run : cargo test --workspace --no-run
5561 - name : Test
@@ -62,13 +68,17 @@ jobs:
6268 runs-on : ${{ matrix.os }}
6369 steps :
6470 - name : Checkout repository
65- uses : actions/checkout@v7
71+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
72+ with :
73+ persist-credentials : false
6674 - name : Install Rust
67- uses : dtolnay/rust-toolchain@stable
75+ run : rustup update --no-self-update stable && rustup default stable
76+ - name : Initialize cache
77+ uses : Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
78+ - name : Install cargo-hack
79+ uses : taiki-e/install-action@37f7c5781271959fb65b6b35224e28652ff2b63d # v2.87.0
6880 with :
69- toolchain : stable
70- - uses : Swatinem/rust-cache@v2
71- - uses : taiki-e/install-action@cargo-hack
81+ tool : cargo-hack
7282 - name : Default features
7383 run : cargo hack check --each-feature --locked --rust-version --ignore-private --workspace --all-targets --keep-going
7484 minimal-versions :
@@ -79,15 +89,13 @@ jobs:
7989 runs-on : ${{ matrix.os }}
8090 steps :
8191 - name : Checkout repository
82- uses : actions/checkout@v7
83- - name : Install stable Rust
84- uses : dtolnay/rust-toolchain@stable
92+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
8593 with :
86- toolchain : stable
94+ persist-credentials : false
95+ - name : Install stable Rust
96+ run : rustup update --no-self-update stable && rustup default stable
8797 - name : Install nightly Rust
88- uses : dtolnay/rust-toolchain@stable
89- with :
90- toolchain : nightly
98+ run : rustup update --no-self-update nightly && rustup default nightly
9199 - name : Downgrade dependencies to minimal versions
92100 run : cargo +nightly generate-lockfile -Z minimal-versions
93101 - name : Compile with minimal versions
@@ -96,41 +104,45 @@ jobs:
96104 runs-on : ubuntu-latest
97105 steps :
98106 - name : Checkout repository
99- uses : actions/checkout@v7
100- - name : Install Rust
101- uses : dtolnay/rust-toolchain@stable
107+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
102108 with :
103- toolchain : stable
104- - uses : Swatinem/rust-cache@v2
109+ persist-credentials : false
110+ - name : Install Rust
111+ run : rustup update --no-self-update stable && rustup default stable
112+ - name : Initialize cache
113+ uses : Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
105114 - name : " Is lockfile updated?"
106115 run : cargo update --workspace --locked
107116 docs :
108117 name : Docs
109118 runs-on : ubuntu-latest
110119 steps :
111120 - name : Checkout repository
112- uses : actions/checkout@v7
113- - name : Install Rust
114- uses : dtolnay/rust-toolchain@stable
121+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
115122 with :
116- toolchain : " 1.98" # STABLE
117- - uses : Swatinem/rust-cache@v2
123+ persist-credentials : false
124+ - name : Install Rust
125+ run : rustup update --no-self-update $RUST_TOOLCHAIN_STABLE && rustup default $RUST_TOOLCHAIN_STABLE
126+ - name : Initialize cache
127+ uses : Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
118128 - name : Check documentation
119129 env :
120- RUSTDOCFLAGS : -D warnings
130+ CARGO_BUILD_WARNINGS : deny
121131 run : cargo doc --workspace --all-features --no-deps --document-private-items --keep-going
122132 rustfmt :
123133 name : rustfmt
124134 runs-on : ubuntu-latest
125135 steps :
126136 - name : Checkout repository
127- uses : actions/checkout@v7
128- - name : Install Rust
129- uses : dtolnay/rust-toolchain@stable
137+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
130138 with :
131- toolchain : " 1.98" # STABLE
132- components : rustfmt
133- - uses : Swatinem/rust-cache@v2
139+ persist-credentials : false
140+ - name : Install Rust
141+ run : rustup update --no-self-update $RUST_TOOLCHAIN_STABLE && rustup default $RUST_TOOLCHAIN_STABLE
142+ - name : Install rustfmt
143+ run : rustup component add rustfmt
144+ - name : Initialize cache
145+ uses : Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
134146 - name : Check formatting
135147 run : cargo fmt --check
136148 clippy :
@@ -140,13 +152,15 @@ jobs:
140152 security-events : write # to upload sarif results
141153 steps :
142154 - name : Checkout repository
143- uses : actions/checkout@v7
144- - name : Install Rust
145- uses : dtolnay/rust-toolchain@stable
155+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
146156 with :
147- toolchain : " 1.98" # STABLE
148- components : clippy
149- - uses : Swatinem/rust-cache@v2
157+ persist-credentials : false
158+ - name : Install Rust
159+ run : rustup update --no-self-update $RUST_TOOLCHAIN_STABLE && rustup default $RUST_TOOLCHAIN_STABLE
160+ - name : Install clippy
161+ run : rustup component add clippy
162+ - name : Initialize cache
163+ uses : Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
150164 - name : Install SARIF tools
151165 run : cargo install clippy-sarif --locked
152166 - name : Install SARIF tools
@@ -159,28 +173,35 @@ jobs:
159173 | sarif-fmt
160174 continue-on-error : true
161175 - name : Upload
162- uses : github/codeql-action/upload-sarif@v4
176+ uses : github/codeql-action/upload-sarif@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
163177 with :
164178 sarif_file : clippy-results.sarif
165179 wait-for-processing : true
166180 - name : Report status
167- run : cargo clippy --workspace --all-features --all-targets --keep-going -- -D warnings --allow deprecated
181+ env :
182+ CARGO_BUILD_WARNINGS : deny
183+ run : cargo clippy --workspace --all-features --all-targets --keep-going -- --allow deprecated --allow renamed_and_removed_lints
168184 coverage :
169185 name : Coverage
170186 runs-on : ubuntu-latest
187+ permissions :
188+ code-quality : write
171189 steps :
172190 - name : Checkout repository
173- uses : actions/checkout@v7
174- - name : Install Rust
175- uses : dtolnay/rust-toolchain@stable
191+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
176192 with :
177- toolchain : stable
178- - uses : Swatinem/rust-cache@v2
193+ persist-credentials : false
194+ - name : Install Rust
195+ run : rustup update --no-self-update stable && rustup default stable
196+ - name : Initialize cache
197+ uses : Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
179198 - name : Install cargo-tarpaulin
180199 run : cargo install cargo-tarpaulin
181200 - name : Gather coverage
182- run : cargo tarpaulin --output-dir coverage --out lcov
183- - name : Publish to Coveralls
184- uses : coverallsapp/github-action@master
201+ run : cargo tarpaulin --out xml
202+ - name : Upload coverage report
203+ if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
204+ uses : actions/upload-code-coverage@d8e329117199404bba6fc81efe8093dc7c015e34 # v1.4.2
185205 with :
186- github-token : ${{ secrets.GITHUB_TOKEN }}
206+ file : cobertura.xml
207+ language : Rust
0 commit comments