Skip to content

Commit

Permalink
feat: Don't pull yarn cache for CI stages that don't need them (#801)
Browse files Browse the repository at this point in the history
  • Loading branch information
welps authored Jul 25, 2023
1 parent e6d3f54 commit a8c709e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
10 changes: 3 additions & 7 deletions .github/actions/testSetup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@ runs:
- uses: actions/setup-node@v3
with:
node-version: "16.20.0"
cache: 'yarn'
- name: Download deps cache artifacts
uses: actions/download-artifact@v3
with:
name: node_modules.tar.gz
- name: Unzip node_modules
shell: 'bash'
run: tar xzvf node_modules.tar.gz
- name: Install latest chromedriver
shell: 'bash'
run: yarn upgrade chromedriver --latest --chromedriver_version=LATEST && yarn setup
run: tar xzf node_modules.tar.gz
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
Expand All @@ -43,8 +39,8 @@ runs:
- uses: actions/checkout@v3
with:
repository: 'rainbow-me/browser-extension-env'
token: ${{ inputs.gh-access-token }}
token: ${{ inputs.gh-access-token }}
path: tmp
- name: Copy dotenv
shell: 'bash'
run: cat tmp/dotenv >> .env && rm -rf tmp
run: cat tmp/dotenv >> .env && rm -rf tmp
17 changes: 7 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
# INSTALL DEPS
install:
runs-on: ubuntu-latest
concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
Expand All @@ -25,13 +25,13 @@ jobs:
- name: Check for frozen lockfile
run: yarn check-lockfile
- name: Zip node_modules
run: tar czvf node_modules.tar.gz node_modules/
run: tar czf node_modules.tar.gz node_modules/
- name: Upload deps artifacts
uses: actions/upload-artifact@v3
with:
name: node_modules.tar.gz
path: node_modules.tar.gz

# BUILD THE EXTENSION
build:
runs-on: ubuntu-latest
Expand All @@ -41,13 +41,12 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "16.20.0"
cache: 'yarn'
- name: Download deps cache artifacts
uses: actions/download-artifact@v3
with:
name: node_modules.tar.gz
- name: Unzip node_modules
run: tar xzvf node_modules.tar.gz
run: tar xzf node_modules.tar.gz
- uses: actions/checkout@v3
with:
repository: 'rainbow-me/browser-extension-env'
Expand All @@ -61,7 +60,7 @@ jobs:
- name: Graphql Setup
run: yarn graphql-setup
- name: Build the extension
run: yarn build:webpack
run: yarn build:webpack
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -157,7 +156,6 @@ jobs:
# - uses: actions/setup-node@v3
# with:
# node-version: "16.20.0"
# cache: 'yarn'
# - name: Download deps cache artifacts
# uses: actions/download-artifact@v3
# with:
Expand Down Expand Up @@ -211,13 +209,12 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "16.20.0"
cache: 'yarn'
- name: Download deps cache artifacts
uses: actions/download-artifact@v3
with:
name: node_modules.tar.gz
- name: Unzip node_modules
run: tar xzvf node_modules.tar.gz
run: tar xzf node_modules.tar.gz
- name: Install rust
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -260,7 +257,7 @@ jobs:
with:
name: node_modules.tar.gz
- name: Unzip node_modules
run: tar xzvf node_modules.tar.gz
run: tar xzf node_modules.tar.gz
- name: DS Setup
run: yarn ds:install
- name: Graphql Setup
Expand Down

0 comments on commit a8c709e

Please sign in to comment.