Skip to content

Commit

Permalink
[CI] Add cachepot -- part2: use cache
Browse files Browse the repository at this point in the history
  • Loading branch information
lubkoll committed Aug 22, 2024
1 parent 72510dd commit 214f03a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/rust_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
default: true
type: boolean

env:
RUSTC_WRAPPER: cachepot

jobs:
checks:
runs-on: ubuntu-latest
Expand All @@ -26,18 +29,21 @@ jobs:
uses: actions/cache/restore@v4
with:
path: |
~/.cache/cachepot
~/.cargo
~/go
smart-contracts/${{ inputs.workspace }}/**/target
key: ${{ runner.os }}-cargo-${{ inputs.workspace }}-$GITHUB_SHA
restore-keys: ${{ runner.os }}-cargo-${{ inputs.workspace }}
key: ${{ runner.os }}-cargo-test3-${{ inputs.workspace }}-${{github.sha}}
restore-keys: ${{ runner.os }}-cargo-test3-${{ inputs.workspace }}
- name: Update PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Rust lint
run: cargo lint
working-directory: smart-contracts/${{ inputs.workspace }}/${{ inputs.target }}
run: cargo clippy --features test-tube --all-targets -- -D warnings
working-directory: smart-contracts/${{ inputs.workspace }}
- name: Rust format check
run: cargo fmt --all -- --check
working-directory: smart-contracts/${{ inputs.workspace }}/${{ inputs.target }}
- name: Run unit-tests
if: inputs.unit_tests
- if: inputs.unit_tests
name: Run unit-tests
run: cargo unit-test
working-directory: smart-contracts/${{ inputs.workspace }}/${{ inputs.target }}
3 changes: 3 additions & 0 deletions .github/workflows/test_tube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ jobs:
unittest: true
proptest: true
store_deps: true
pre-commit:
uses: ./.github/workflows/all_checks_osmosis.yml
if: github.event_name == 'pull_request'

0 comments on commit 214f03a

Please sign in to comment.