Skip to content

Commit

Permalink
Bump CI actions
Browse files Browse the repository at this point in the history
  • Loading branch information
samhh committed Feb 16, 2024
1 parent 498224d commit f393c32
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/actions/cargo-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ runs:
using: composite
steps:
- name: Cache registry
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cargo/registry/
key: cargo-registry-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-registry-${{ runner.os }}
- name: Cache build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./target/
key: target-${{ runner.os }}-${{ github.sha }}
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,37 @@ jobs:
name: Validate Nix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
- run: nix flake check

check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: rm -rf ~/.cargo/
- uses: cachix/install-nix-action@v22
- uses: cachix/install-nix-action@v25
- uses: ./.github/actions/cargo-cache
- run: nix develop -c cargo check

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: rm -rf ~/.cargo/
- uses: cachix/install-nix-action@v22
- uses: cachix/install-nix-action@v25
- uses: ./.github/actions/cargo-cache
- run: nix develop -c cargo test

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: rm -rf ~/.cargo/
- uses: cachix/install-nix-action@v22
- uses: cachix/install-nix-action@v25
- uses: ./.github/actions/cargo-cache
# See: https://github.com/rust-lang/rust-clippy/issues/1209
- run: RUSTFLAGS="-D warnings" nix develop -c cargo clippy --all-targets
Expand All @@ -51,7 +51,7 @@ jobs:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: rm -rf ~/.cargo/
- uses: cachix/install-nix-action@v22
- uses: cachix/install-nix-action@v25
- run: nix develop -c cargo fmt --check
13 changes: 7 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
env:
AWS_DEFAULT_REGION: us-west-2
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25

- name: Build
# Docker is preinstalled.
Expand Down Expand Up @@ -69,19 +69,20 @@ jobs:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
id-token: write
pages: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: rm -rf ~/.cargo/
- uses: cachix/install-nix-action@v22
- uses: cachix/install-nix-action@v25
- uses: ./.github/actions/cargo-cache
- run: |
nix develop -c cargo doc --no-deps
rm ./target/doc/.lock
echo '<meta http-equiv="refresh" content="0; url=mercury">' > ./target/doc/index.html
- uses: actions/upload-pages-artifact@v1
- uses: actions/upload-pages-artifact@v3
with:
path: ./target/doc/
- uses: actions/deploy-pages@v2
- uses: actions/deploy-pages@v4

0 comments on commit f393c32

Please sign in to comment.