2022-07-28 21:22:02 -06:00
|
|
|
name: NPM testing and publish package
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 16
|
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
|
|
|
|
- run: npm test
|
2023-03-02 07:57:42 -06:00
|
|
|
cypress-run:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
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-07-28 21:22:02 -06:00
|
|
|
publish-npm:
|
|
|
|
needs: build
|
|
|
|
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 publish --access=public
|
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|