Add Rust cache to continuous integration workflow.
This commit is contained in:
parent
52974aed75
commit
30d3898b5b
|
@ -14,6 +14,11 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Rust Cache
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
key: ${{ runner.os }}-cache-acceptance-v${{ inputs.cache-version }}
|
||||||
- name: Run examples
|
- name: Run examples
|
||||||
run: |
|
run: |
|
||||||
cargo run -r -- check examples/hello_world
|
cargo run -r -- check examples/hello_world
|
||||||
|
@ -30,6 +35,11 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Rust Cache
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
key: ${{ runner.os }}-cache-unit-v${{ inputs.cache-version }}
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: cargo test --verbose --workspace
|
run: cargo test --verbose --workspace
|
||||||
|
|
||||||
|
@ -37,6 +47,11 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Rust Cache
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
key: ${{ runner.os }}-cache-unit-v${{ inputs.cache-version }}
|
||||||
- name: Format
|
- name: Format
|
||||||
run: cargo fmt --all -- --check
|
run: cargo fmt --all -- --check
|
||||||
- name: Clippy
|
- name: Clippy
|
||||||
|
|
Loading…
Reference in New Issue