mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-23 01:44:31 -06:00
Update workflow file
This commit is contained in:
parent
f60c9b24c5
commit
6560950b65
41
.github/workflows/cd.yaml
vendored
41
.github/workflows/cd.yaml
vendored
@ -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
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Audit
|
||||
run: npm audit --production
|
||||
|
||||
- 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
|
||||
@ -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/')
|
||||
|
Loading…
x
Reference in New Issue
Block a user