mirror of
https://github.com/msfjarvis/healthchecks-rs.git
synced 2024-06-03 04:18:58 +05:30
github: improve caching mechanism
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
03a216e977
commit
9ab249da46
23
.github/workflows/check.yml
vendored
23
.github/workflows/check.yml
vendored
|
@ -9,15 +9,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Rust nightly with rustfmt and clippy
|
||||
uses: actions-rs/toolchain@v1
|
||||
|
@ -38,6 +30,19 @@ jobs:
|
|||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Generate lockfile
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: generate-lockfile
|
||||
|
||||
- name: Cache cargo registry and build outputs
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
|
||||
|
||||
- name: Check formatting
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
|
|
20
.github/workflows/nix.yml
vendored
20
.github/workflows/nix.yml
vendored
|
@ -9,14 +9,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v10
|
||||
|
@ -26,5 +19,16 @@ jobs:
|
|||
- name: Enter nix-shell
|
||||
run: nix-shell --pure
|
||||
|
||||
- name: Generate lockfile
|
||||
run: cargo generate-lockfile
|
||||
|
||||
- name: Cache cargo registry and build outputs
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
|
||||
|
||||
- name: Run cargo check
|
||||
run: cargo check
|
||||
|
|
Loading…
Reference in New Issue
Block a user