Add Rust cache to continuous integration workflow.

This commit is contained in:
KtorZ 2024-07-17 12:56:41 +02:00
parent 52974aed75
commit 30d3898b5b
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
1 changed files with 15 additions and 0 deletions

View File

@ -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