Skip to content

Commit

Permalink
ci: try s3 cache
Browse files Browse the repository at this point in the history
  • Loading branch information
TroyKomodo committed Jul 17, 2023
1 parent 093e995 commit 15aa6e7
Showing 1 changed file with 24 additions and 35 deletions.
59 changes: 24 additions & 35 deletions .github/workflows/lint-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,20 @@ jobs:
- name: Run migrations
run: mask db migrate

- name: Run JS, Terraform & Proto Lint
run: mask lint --no-rust

- name: Restore cached lint build
id: cache-lint
uses: actions/cache/restore@v3
uses: tespkg/actions-cache@v1
with:
accessKey: ${{ secrets.CI_CACHE_ACCESS_KEY_ID }}
secretKey: ${{ secrets.CI_CACHE_SECRET_ACCESS_KEY }}
bucket: ${{ secrets.CI_CACHE_BUCKET_NAME }}
endpoint: ${{ secrets.CI_CACHE_ENDPOINT }}
path: |
target/
key: lint-${{ hashFiles('**/Cargo.lock') }}
restore-keys: lint-
key: lint-rust-${{ hashFiles('Cargo.lock') }}
restore-keys: lint-rust-

- name: Cargo Sweep Start
run: cargo sweep -s
Expand All @@ -108,16 +114,6 @@ jobs:
- name: Cargo Sweep Finish
run: cargo sweep -f

- name: Save lint build cache
uses: actions/cache/save@v3
with:
path: |
target/
key: ${{ steps.cache-lint.outputs.cache-primary-key }}

- name: Run JS, Terraform & Proto Lint
run: mask lint --no-rust

test:
name: Run Tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -168,12 +164,16 @@ jobs:

- name: Restore cached test build
id: cache-test
uses: actions/cache/restore@v3
uses: tespkg/actions-cache@v1
with:
accessKey: ${{ secrets.CI_CACHE_ACCESS_KEY_ID }}
secretKey: ${{ secrets.CI_CACHE_SECRET_ACCESS_KEY }}
bucket: ${{ secrets.CI_CACHE_BUCKET_NAME }}
endpoint: ${{ secrets.CI_CACHE_ENDPOINT }}
path: |
target/
key: test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: test-
key: test-rust-${{ hashFiles('Cargo.lock') }}
restore-keys: test-rust-

- name: Cargo Sweep Start
run: cargo sweep -s
Expand All @@ -191,13 +191,6 @@ jobs:
- name: Cargo Sweep Finish
run: cargo sweep -f

- name: Save test build cache
uses: actions/cache/save@v3
with:
path: |
target/
key: ${{ steps.cache-test.outputs.cache-primary-key }}

- name: Install Playwright Dependencies
run: pnpm --filter website exec playwright install-deps

Expand Down Expand Up @@ -231,13 +224,16 @@ jobs:
run: mask bootstrap --no-db --no-docker --no-env --no-js-tests --no-rust

- name: Restore cached build
id: cache-build
uses: actions/cache/restore@v3
uses: tespkg/actions-cache@v1
with:
accessKey: ${{ secrets.CI_CACHE_ACCESS_KEY_ID }}
secretKey: ${{ secrets.CI_CACHE_SECRET_ACCESS_KEY }}
bucket: ${{ secrets.CI_CACHE_BUCKET_NAME }}
endpoint: ${{ secrets.CI_CACHE_ENDPOINT }}
path: |
target/
key: build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: build-
key: build-rust-${{ hashFiles('Cargo.lock') }}
restore-keys: build-rust-

- name: Cargo Sweep Start
run: cargo sweep -s
Expand All @@ -248,13 +244,6 @@ jobs:
- name: Cargo Sweep Finish
run: cargo sweep -f

- name: Save build cache
uses: actions/cache/save@v3
with:
path: |
target/
key: ${{ steps.cache-build.outputs.cache-primary-key }}

- name: Run Build Website
run: mask build website

Expand Down

0 comments on commit 15aa6e7

Please sign in to comment.