on master help sign in
CICD: Pass --locked to all cargo commands

To avoid that earlier cargo commands "fixes" Cargo.lock before cargo commands with --locked has a chance to check if it is up to date.

commit697d106bd47069c75c18774dcac9f601877c0e2c authorMartin Nordholts <enselic@gmail.com> dateMon 2 Aug 2021, 13:15 (5 years ago) parenta610987
1 file changed+13−12
.github/workflows/CICD.yml+13−12
.github/workflows/CICD.yml+13−12
@@ -32,11 +32,12 @@ jobs:
3232 uses: actions-rs/cargo@v1
3333 with:
3434 command: clippy
35− args: --all-targets --all-features
35+ args: --locked --all-targets --all-features
3636 - name: Run tests
3737 uses: actions-rs/cargo@v1
3838 with:
3939 command: test
40+ args: --locked
4041
4142 test_with_new_syntaxes_and_themes:
4243 name: Run tests with updated syntaxes and themes
@@ -68,12 +69,12 @@ jobs:
6869 uses: actions-rs/cargo@v1
6970 with:
7071 command: test
71− args: --release
72+ args: --locked --release
7273 - name: Run ignored-by-default unit tests with new syntaxes and themes
7374 uses: actions-rs/cargo@v1
7475 with:
7576 command: test
76− args: --release -- --ignored
77+ args: --locked --release -- --ignored
7778 - name: Syntax highlighting regression test
7879 run: tests/syntax-tests/regression_test.sh
7980 - name: List of languages
@@ -86,7 +87,7 @@ jobs:
8687 uses: actions-rs/cargo@v1
8788 with:
8889 command: doc
89− args: --no-deps --document-private-items --all-features
90+ args: --locked --no-deps --document-private-items --all-features
9091
9192 build:
9293 name: ${{ matrix.job.os }} (${{ matrix.job.target }})
@@ -149,7 +150,7 @@ jobs:
149150 with:
150151 use-cross: ${{ matrix.job.use-cross }}
151152 command: build
152− args: --release --target=${{ matrix.job.target }}
153+ args: --locked --release --target=${{ matrix.job.target }}
153154
154155 - name: Strip debug information from executable
155156 id: strip
@@ -201,49 +202,49 @@ jobs:
201202 with:
202203 use-cross: ${{ matrix.job.use-cross }}
203204 command: test
204− args: --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
205+ args: --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
205206
206207 - name: Run bat
207208 uses: actions-rs/cargo@v1
208209 with:
209210 use-cross: ${{ matrix.job.use-cross }}
210211 command: run
211− args: --target=${{ matrix.job.target }} -- --paging=never --color=always --theme=ansi Cargo.toml src/config.rs
212+ args: --locked --target=${{ matrix.job.target }} -- --paging=never --color=always --theme=ansi Cargo.toml src/config.rs
212213
213214 - name: Show diagnostics (bat --diagnostic)
214215 uses: actions-rs/cargo@v1
215216 with:
216217 use-cross: ${{ matrix.job.use-cross }}
217218 command: run
218− args: --target=${{ matrix.job.target }} -- --paging=never --color=always --theme=ansi Cargo.toml src/config.rs --diagnostic
219+ args: --locked --target=${{ matrix.job.target }} -- --paging=never --color=always --theme=ansi Cargo.toml src/config.rs --diagnostic
219220
220221 - name: "Feature check: regex-onig"
221222 uses: actions-rs/cargo@v1
222223 with:
223224 use-cross: ${{ matrix.job.use-cross }}
224225 command: check
225− args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig
226+ args: --locked --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig
226227
227228 - name: "Feature check: regex-onig,git"
228229 uses: actions-rs/cargo@v1
229230 with:
230231 use-cross: ${{ matrix.job.use-cross }}
231232 command: check
232− args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git
233+ args: --locked --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git
233234
234235 - name: "Feature check: regex-onig,paging"
235236 uses: actions-rs/cargo@v1
236237 with:
237238 use-cross: ${{ matrix.job.use-cross }}
238239 command: check
239− args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,paging
240+ args: --locked --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,paging
240241
241242 - name: "Feature check: regex-onig,git,paging"
242243 uses: actions-rs/cargo@v1
243244 with:
244245 use-cross: ${{ matrix.job.use-cross }}
245246 command: check
246− args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git,paging
247+ args: --locked --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git,paging
247248
248249 - name: Create tarball
249250 id: package