Merge pull request #425 from patrickcate/dependabot/npm_and_yarn/babe… #872
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
# This workflow does a clean install of node dependencies, builds the site, | |
# runs all Jest unit tests, and update code coverage to Codecov. | |
name: build | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: yarn --frozen-lockfile | |
- run: yarn generate | |
unit-tests: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: yarn --frozen-lockfile | |
- run: yarn test:unit | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./_coverage/lcov.info | |
flags: unittests | |
e2e-tests: | |
name: End-to-End Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: yarn --frozen-lockfile | |
- name: Run Cypress | |
uses: cypress-io/github-action@v6 | |
with: | |
wait-on: 'http://localhost:3000' | |
build: yarn generate | |
start: yarn start |