Skip to content

Commit

Permalink
Merge pull request #24 from unsplash/bump-actions
Browse files Browse the repository at this point in the history
Bump CI actions
  • Loading branch information
samhh authored Feb 20, 2024
2 parents f5d34f8 + 40fee3d commit 7fed4d2
Show file tree
Hide file tree
Showing 3 changed files with 18 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
12 changes: 6 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 @@ -73,15 +73,15 @@ jobs:
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 7fed4d2

Please sign in to comment.