From ca7be6fab6a3bebee664cad82baf91919ad23b09 Mon Sep 17 00:00:00 2001 From: Lucas Kent Date: Tue, 2 Jan 2024 18:04:31 +1100 Subject: [PATCH] Minor CI improvements --- .github/workflows/release.yml | 2 +- .github/workflows/testing.yml | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef2ae03..38dab53 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: name: "Publish Binary to GitHub" runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Build & test run: | cargo test --release diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index cdc3bcb..a19ebe9 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -40,8 +40,8 @@ jobs: name: ${{ matrix.name }} runs-on: ${{ matrix.runner }} steps: - - uses: actions/checkout@v2 - - uses: Swatinem/rust-cache@v1 + - uses: actions/checkout@v3 + - uses: Swatinem/rust-cache@v2 with: # rust-cache already handles all the sane defaults for caching rust builds. # However because we are running seperate debug/release builds in parallel, @@ -49,7 +49,9 @@ jobs: # Otherwise only the last build to finish would get saved to the cache. key: ${{ matrix.name }} - name: Install cargo-hack - run: cargo install cargo-hack --version 0.5.8 + uses: taiki-e/install-action@v2 + with: + tool: cargo-hack@0.6.4 - name: Check `cargo fmt` was run run: | cargo fmt --all -- --check @@ -72,3 +74,9 @@ jobs: - name: Ensure that tests pass under every possible combination of features run: | cargo hack --feature-powerset test ${{ matrix.cargo_profile }} + - name: Ensure that tests did not create or modify any files that arent .gitignore'd + run: | + if [ -n "$(git status --porcelain)" ]; then + git status + exit 1 + fi