build: cache node_modules in CI #229
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches-ignore: [gh-pages] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup test browser | |
uses: browser-actions/setup-chrome@latest | |
- uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
cache: 'yarn' | |
# TODO cache | |
- name: Install | |
run: yarn install --frozen-lockfile | |
- name: Cache Modules | |
uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Build | |
run: yarn build | |
- name: Lint | |
run: yarn lint | |
# TODO Run as separate job? Only when Install is cached | |
- name: Test | |
run: yarn test:ci | |
- name: Cy Component Test | |
run: yarn test:cy:ci | |