2022-07-28 21:22:02 -06:00
|
|
|
name: Testing package
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches: ['*']
|
|
|
|
jobs:
|
2022-08-01 09:02:40 -06:00
|
|
|
test:
|
2022-07-28 21:22:02 -06:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [16.x]
|
|
|
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Use Node.js 16
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
cache: 'npm'
|
2022-08-01 09:02:40 -06:00
|
|
|
registry-url: https://registry.npmjs.org/
|
2022-07-28 21:22:02 -06:00
|
|
|
- run: npm ci
|
2022-08-01 09:02:40 -06:00
|
|
|
- run: npm test
|
2023-03-02 07:57:42 -06:00
|
|
|
cypress-run:
|
|
|
|
runs-on: ubuntu-latest
|
2023-03-02 08:12:41 -06:00
|
|
|
env:
|
|
|
|
PORT: 3000
|
2023-03-02 07:57:42 -06:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
# Install NPM dependencies, cache them correctly
|
|
|
|
# and run all Cypress tests
|
|
|
|
- name: Cypress run
|
2023-03-02 08:05:20 -06:00
|
|
|
uses: cypress-io/github-action@v5 # use the explicit version number
|
2023-03-02 07:57:42 -06:00
|
|
|
with:
|
|
|
|
build: npm run build
|
|
|
|
start: npm start
|
2022-08-01 09:02:40 -06:00
|
|
|
test-build-package:
|
2023-03-02 08:39:45 -06:00
|
|
|
needs: [ test, cypress-run ]
|
2022-08-01 09:02:40 -06:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
registry-url: https://registry.npmjs.org/
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm run build
|