Skip to content

Commit

Permalink
Update workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
Ionaru committed Sep 18, 2022
1 parent f60c9b2 commit 6560950
Showing 1 changed file with 25 additions and 16 deletions.
41 changes: 25 additions & 16 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,49 @@ on:
- master

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:

needs: [ audit ]
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ '12', '14', '16', '18' ]
node-version: [ '14', '16', '18' ]

steps:
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Checkout
uses: actions/checkout@v2

- name: Audit
run: npm audit --production
- uses: actions/checkout@v3

- name: Install packages
run: npm install
- run: npm ci

- name: Test
run: npm test

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
retention-days: 7

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
Expand All @@ -58,14 +68,13 @@ jobs:
if: github.event_name == 'push'

steps:
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: current

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install packages
run: npm install
- run: npm ci

- name: Deploy @latest version to npm
if: startsWith(github.ref, 'refs/tags/')
Expand Down

0 comments on commit 6560950

Please sign in to comment.