Skip to content

Commit

Permalink
${{ env.USE_CACHING }}
Browse files Browse the repository at this point in the history
  • Loading branch information
HowardBraham committed Dec 17, 2024
1 parent 67a59b0 commit 4bace58
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/add-release-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}

- name: Get the next semver version
id: get-next-semver-version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-attributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}

- name: Check attributions changes
run: yarn attributions:check
2 changes: 1 addition & 1 deletion .github/workflows/check-pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}

- name: Check PR has required labels
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-template-and-add-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}

- name: Check template and add labels
id: check-template-and-add-labels
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/close-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}

- name: Close release bug report issue
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codespaces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}
2 changes: 1 addition & 1 deletion .github/workflows/fitness-functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}

- name: Run fitness functions
env:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: false
should-cache-save: $USE_CACHING
should-cache-restore: 'false'
should-cache-save: ${{ env.USE_CACHING }}

prep-build-test-webpack:
needs: prep-deps
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}

# should add `--env production` to this but need `SEGMENT_PROD_WRITE_KEY`
- run: yarn webpack --test --no-lavamoat --no-cache --browser=chrome --lockdown --sentry --snow
Expand All @@ -65,6 +65,8 @@ jobs:
run-tests:
needs: prep-deps
uses: ./.github/workflows/run-tests.yml
with:
USE_CACHING: ${{ env.USE_CACHING }}

run-pageload-benchmark:
name: Run Benchmarks # So that the level 1 name will be "Run Benchmarks" in the GitHub Actions UI
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Run tests

on:
workflow_call:
inputs:
USE_CACHING:
required: true
type: string
outputs:
current-coverage:
description: Current coverage
Expand All @@ -21,7 +25,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}

- name: test:unit:coverage
run: yarn test:unit:coverage --shard=${{ matrix.shard }}/${{ strategy.job-total }}
Expand All @@ -41,7 +45,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}

- name: test:unit:webpack:coverage
run: yarn test:unit:webpack:coverage
Expand All @@ -61,7 +65,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}

- name: test:integration:coverage
run: yarn test:integration:coverage
Expand All @@ -88,7 +92,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}

- name: Download artifacts
uses: actions/download-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-attributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}
- name: Get commit SHA
id: commit-sha
run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
Expand All @@ -85,7 +85,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}
- name: Generate Attributions
run: yarn attributions:generate
- name: Cache attributions file
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-lavamoat-policies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}
- name: Get commit SHA
id: commit-sha
run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
Expand All @@ -82,7 +82,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}
- name: Update LavaMoat build policy
run: yarn lavamoat:build:auto
- name: Cache build policy
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: $USE_CACHING
should-cache-restore: ${{ env.USE_CACHING }}
- name: Restore build policy
uses: actions/cache/restore@v4
with:
Expand Down

0 comments on commit 4bace58

Please sign in to comment.