Skip to content

Commit

Permalink
github actions now check for lock file changes
Browse files Browse the repository at this point in the history
Previously a Cargo.lock file could change during CI runs, hiding package
updates.  Now the `--locked` flag is passed to the CI checks resulting
in an error if a Cargo.lock file changes.
  • Loading branch information
nick-mobilecoin committed Jul 21, 2022
1 parent 0f0714d commit 446d863
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@ jobs:
- name: Setup rust toolchain
run: rustup show
working-directory: ${{ matrix.dir }}
# actions-rs/cargo does not support the `working-directory` argument,
# see https://github.com/actions-rs/cargo/issues/6
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path ${{ matrix.dir }}/Cargo.toml --all -- --check
- run: cargo fmt --all -- --check
working-directory: ${{ matrix.dir }}
clippy:
runs-on: [self-hosted, Linux, small]
container: mobilecoin/rust-sgx-base:latest
Expand All @@ -45,5 +41,5 @@ jobs:
- name: Setup rust toolchain
run: rustup show
working-directory: ${{ matrix.dir }}
- run: cargo clippy --all --all-features -- -D warnings
- run: cargo clippy --all --all-features --locked -- -D warnings
working-directory: ${{ matrix.dir }}
4 changes: 2 additions & 2 deletions .github/workflows/trusted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# see https://github.com/actions-rs/toolchain/issues/126
- name: Setup rust toolchain
run: rustup show
- run: cargo build --release
- run: cargo build --release --locked
test:
runs-on: [self-hosted, Linux, small]
container: mobilecoin/rust-sgx-base:latest
Expand All @@ -37,5 +37,5 @@ jobs:
# see https://github.com/actions-rs/toolchain/issues/126
- name: Setup rust toolchain
run: rustup show
- run: cargo test --release
- run: cargo test --release --locked

4 changes: 2 additions & 2 deletions .github/workflows/untrusted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# see https://github.com/actions-rs/toolchain/issues/126
- name: Setup rust toolchain
run: rustup show
- run: cargo build --release
- run: cargo build --release --locked
test:
runs-on: [self-hosted, Linux, small]
container: mobilecoin/rust-sgx-base:latest
Expand All @@ -37,4 +37,4 @@ jobs:
# see https://github.com/actions-rs/toolchain/issues/126
- name: Setup rust toolchain
run: rustup show
- run: cargo test --release
- run: cargo test --release --locked

0 comments on commit 446d863

Please sign in to comment.