ci: Run cargo in locked mode

Per https://doc.rust-lang.org/cargo/commands/cargo-test.html#manifest-options,
`cargo --locked` assumes that `Cargo.lock` is up-to-date, and otherwise
exits with an error.
Besides the nice validation, this might hopefully speed-up CI a bit.

This could be done on Web as well, but I'm not sure what's the best
way of doing it.
This commit is contained in:
relrelb 2022-05-17 21:49:42 +03:00 committed by Mike Welsh
parent f3af11db9c
commit 4021cb54a4
1 changed files with 2 additions and 1 deletions

View File

@ -77,13 +77,14 @@ jobs:
XDG_RUNTIME_DIR: '' # dummy value, just to silence warnings about it missing XDG_RUNTIME_DIR: '' # dummy value, just to silence warnings about it missing
with: with:
command: test command: test
args: --features imgtests args: --locked --features imgtests
- name: Run tests without image tests - name: Run tests without image tests
if: ${{ !(runner.os == 'Linux' || runner.os == 'Windows') }} if: ${{ !(runner.os == 'Linux' || runner.os == 'Windows') }}
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: test command: test
args: --locked
- name: Upload images - name: Upload images
if: failure() if: failure()