Skip to content

Commit

Permalink
chore: Update workflows to cache dependencies (#2083)
Browse files Browse the repository at this point in the history
  • Loading branch information
jongwooo authored Oct 2, 2022
1 parent aaf710c commit f86059f
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 9 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,24 @@ jobs:
github.event_name == 'deployment_status' &&
github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: npm ci
env:
CI: true

- name: Run end-to-end tests.
run: npm run test:e2e
env:
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/generate-theme-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v1
- name: setup node
uses: actions/setup-node@v1
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16.x"
node-version: ${{ matrix.node-version }}
cache: npm

- name: npm install, generate readme
run: |
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/preview-theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,24 @@ on:
jobs:
previewTheme:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
name: Install & Preview

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: ${{ matrix.node-version }}
cache: npm

- uses: bahmutov/npm-install@v1
with:
useLockFile: false

- run: npm run preview-theme
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: "16.x"
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install & Test
run: |
Expand Down

1 comment on commit f86059f

@vercel
Copy link

@vercel vercel bot commented on f86059f Oct 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.