Skip to content

Commit

Permalink
chore(ci): deduplicate yarn cache by removing the set-up-job action (
Browse files Browse the repository at this point in the history
…#8504)

* chore(ci): remove set up job action

This avoids caching yarn dependencies under two different keys.

* same for canary release workflows
  • Loading branch information
jtoar authored Jun 3, 2023
1 parent 48ae050 commit 3ff5c6b
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 50 deletions.
36 changes: 0 additions & 36 deletions .github/actions/set-up-job/action.yml

This file was deleted.

63 changes: 53 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
- name: ⬢ Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- run: yarn install
- name: 🐈 Yarn install
working-directory: ./.github/actions/only_doc_changes
run: yarn install --inline-builds
env:
GITHUB_TOKEN: ${{ github.token }}

- name: 📖 Only doc changes?
id: only-doc-changes
Expand All @@ -40,11 +44,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

- name: ⬢ Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn install

- name: 🐈 Yarn install
working-directory: ./tasks/check
run: yarn install --inline-builds
env:
GITHUB_TOKEN: ${{ github.token }}

- name: ✅ Check constraints, dependencies, and package.json's
uses: ./tasks/check
Expand All @@ -71,8 +81,19 @@ jobs:
run: echo "echo "::remove-matcher owner=tsc::""

- uses: actions/checkout@v3
- name: 🧶 Set up job
uses: ./.github/actions/set-up-job

- name: ⬢ Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: 🐈 Set up yarn cache
uses: ./.github/actions/set-up-yarn-cache

- name: 🐈 Yarn install
run: yarn install --inline-builds
env:
GITHUB_TOKEN: ${{ github.token }}

- name: 🔨 Build
run: yarn build
Expand Down Expand Up @@ -109,8 +130,19 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: 🧶 Set up job
uses: ./.github/actions/set-up-job

- name: ⬢ Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: 🐈 Set up yarn cache
uses: ./.github/actions/set-up-yarn-cache

- name: 🐈 Yarn install
run: yarn install --inline-builds
env:
GITHUB_TOKEN: ${{ github.token }}

- name: 📁 Create a temporary directory
id: createpath
Expand Down Expand Up @@ -378,8 +410,19 @@ jobs:
REDWOOD_REDIRECT_TELEMETRY: "http://127.0.0.1:48619" # Random port
steps:
- uses: actions/checkout@v3
- name: 🧶 Set up job
uses: ./.github/actions/set-up-job

- name: ⬢ Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: 🐈 Set up yarn cache
uses: ./.github/actions/set-up-yarn-cache

- name: 🐈 Yarn install
run: yarn install --inline-builds
env:
GITHUB_TOKEN: ${{ github.token }}

- name: 🔨 Build
run: yarn build
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/publish-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,18 @@ jobs:
with:
fetch-depth: 0

- name: 🧶 Set up job
uses: ./.github/actions/set-up-job
- name: ⬢ Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: 🐈 Set up yarn cache
uses: ./.github/actions/set-up-yarn-cache

- name: 🐈 Yarn install
run: yarn install --inline-builds
env:
GITHUB_TOKEN: ${{ github.token }}

- name: ✅ Check constraints, dependencies, and package.json's
uses: ./tasks/check
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/publish-release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,18 @@ jobs:
# This is required because lerna uses tags to determine the version.
fetch-depth: 0

- name: 🧶 Set up job
uses: ./.github/actions/set-up-job
- name: ⬢ Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: 🐈 Set up yarn cache
uses: ./.github/actions/set-up-yarn-cache

- name: 🐈 Yarn install
run: yarn install --inline-builds
env:
GITHUB_TOKEN: ${{ github.token }}

- name: ✅ Check constraints, dependencies, and package.json's
uses: ./tasks/check
Expand Down

0 comments on commit 3ff5c6b

Please sign in to comment.