|
|
@ -12,39 +12,49 @@ on:
|
|
|
|
- master
|
|
|
|
- master
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
audit:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
node-version: current
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- run: npm audit --omit=dev
|
|
|
|
|
|
|
|
|
|
|
|
test:
|
|
|
|
test:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
needs: [ audit ]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
matrix:
|
|
|
|
node-version: [ '12', '14', '16', '18' ]
|
|
|
|
node-version: [ '14', '16', '18' ]
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
|
|
|
|
|
|
|
|
- name: Checkout
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Audit
|
|
|
|
|
|
|
|
run: npm audit --production
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install packages
|
|
|
|
- run: npm ci
|
|
|
|
run: npm install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
- name: Test
|
|
|
|
run: npm test
|
|
|
|
run: npm test
|
|
|
|
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
if: failure()
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
name: cypress-screenshots
|
|
|
|
name: cypress-screenshots
|
|
|
|
path: cypress/screenshots
|
|
|
|
path: cypress/screenshots
|
|
|
|
retention-days: 7
|
|
|
|
retention-days: 7
|
|
|
|
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
if: always()
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
name: cypress-videos
|
|
|
|
name: cypress-videos
|
|
|
@ -58,14 +68,13 @@ jobs:
|
|
|
|
if: github.event_name == 'push'
|
|
|
|
if: github.event_name == 'push'
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
node-version: '16'
|
|
|
|
node-version: current
|
|
|
|
|
|
|
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install packages
|
|
|
|
- run: npm ci
|
|
|
|
run: npm install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Deploy @latest version to npm
|
|
|
|
- name: Deploy @latest version to npm
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|