Run cargo with --locked in CI (#9247)

This should ensure that CI fails if the lockfile is not up-to-date (see:
https://github.com/astral-sh/ruff/pull/9235).
This commit is contained in:
Charlie Marsh 2023-12-22 10:53:42 -05:00 committed by GitHub
parent 9cc257ee7d
commit bb86d359d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View file

@ -95,9 +95,9 @@ jobs:
rustup target add wasm32-unknown-unknown rustup target add wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- name: "Clippy" - name: "Clippy"
run: cargo clippy --workspace --all-targets --all-features -- -D warnings run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
- name: "Clippy (wasm)" - name: "Clippy (wasm)"
run: cargo clippy -p ruff_wasm --target wasm32-unknown-unknown --all-features -- -D warnings run: cargo clippy -p ruff_wasm --target wasm32-unknown-unknown --all-features --locked -- -D warnings
cargo-test-linux: cargo-test-linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View file

@ -73,7 +73,7 @@ jobs:
uses: PyO3/maturin-action@v1 uses: PyO3/maturin-action@v1
with: with:
target: x86_64 target: x86_64
args: --release --out dist args: --release --locked --out dist
- name: "Test wheel - x86_64" - name: "Test wheel - x86_64"
run: | run: |
pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
@ -112,7 +112,7 @@ jobs:
- name: "Build wheels - universal2" - name: "Build wheels - universal2"
uses: PyO3/maturin-action@v1 uses: PyO3/maturin-action@v1
with: with:
args: --release --target universal2-apple-darwin --out dist args: --release --locked --target universal2-apple-darwin --out dist
- name: "Test wheel - universal2" - name: "Test wheel - universal2"
run: | run: |
pip install dist/${{ env.PACKAGE_NAME }}-*universal2.whl --force-reinstall pip install dist/${{ env.PACKAGE_NAME }}-*universal2.whl --force-reinstall
@ -161,7 +161,7 @@ jobs:
uses: PyO3/maturin-action@v1 uses: PyO3/maturin-action@v1
with: with:
target: ${{ matrix.platform.target }} target: ${{ matrix.platform.target }}
args: --release --out dist args: --release --locked --out dist
- name: "Test wheel" - name: "Test wheel"
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }} if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
shell: bash shell: bash
@ -210,7 +210,7 @@ jobs:
with: with:
target: ${{ matrix.target }} target: ${{ matrix.target }}
manylinux: auto manylinux: auto
args: --release --out dist args: --release --locked --out dist
- name: "Test wheel" - name: "Test wheel"
if: ${{ startsWith(matrix.target, 'x86_64') }} if: ${{ startsWith(matrix.target, 'x86_64') }}
run: | run: |
@ -269,7 +269,7 @@ jobs:
target: ${{ matrix.platform.target }} target: ${{ matrix.platform.target }}
manylinux: auto manylinux: auto
docker-options: ${{ matrix.platform.maturin_docker_options }} docker-options: ${{ matrix.platform.maturin_docker_options }}
args: --release --out dist args: --release --locked --out dist
- uses: uraimo/run-on-arch-action@v2 - uses: uraimo/run-on-arch-action@v2
if: matrix.platform.arch != 'ppc64' if: matrix.platform.arch != 'ppc64'
name: Test wheel name: Test wheel
@ -324,7 +324,7 @@ jobs:
with: with:
target: ${{ matrix.target }} target: ${{ matrix.target }}
manylinux: musllinux_1_2 manylinux: musllinux_1_2
args: --release --out dist args: --release --locked --out dist
- name: "Test wheel" - name: "Test wheel"
if: matrix.target == 'x86_64-unknown-linux-musl' if: matrix.target == 'x86_64-unknown-linux-musl'
uses: addnab/docker-run-action@v3 uses: addnab/docker-run-action@v3
@ -379,7 +379,7 @@ jobs:
with: with:
target: ${{ matrix.platform.target }} target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2 manylinux: musllinux_1_2
args: --release --out dist args: --release --locked --out dist
docker-options: ${{ matrix.platform.maturin_docker_options }} docker-options: ${{ matrix.platform.maturin_docker_options }}
- uses: uraimo/run-on-arch-action@v2 - uses: uraimo/run-on-arch-action@v2
name: Test wheel name: Test wheel