Skip to content

Merge pull request #423 from patrickcate/dependabot/npm_and_yarn/core… #873

Merge pull request #423 from patrickcate/dependabot/npm_and_yarn/core…

Merge pull request #423 from patrickcate/dependabot/npm_and_yarn/core… #873

Workflow file for this run

# 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