[Snyk] Security upgrade del from 6.1.1 to 8.0.0 #272
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
unit: | |
name: Unit | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
node-version: ['*'] | |
steps: | |
# Sets an output parameter if this is a release PR | |
- name: Check for release | |
id: release-check | |
# For windows we have to use $env: | |
run: |- | |
echo "IS_RELEASE=true" >> $GITHUB_OUTPUT | |
echo "IS_RELEASE=true" >> $env:GITHUB_OUTPUT | |
if: "${{ startsWith(github.head_ref, 'release-') }}" | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
if: '${{!steps.release-check.outputs.IS_RELEASE}}' | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
cache-dependency-path: 'npm-shrinkwrap.json' | |
check-latest: true | |
if: '${{!steps.release-check.outputs.IS_RELEASE}}' | |
- name: Install core dependencies | |
run: npm ci --no-audit | |
if: '${{!steps.release-check.outputs.IS_RELEASE}}' | |
- name: Install site dependencies | |
run: npm run site:build:install | |
if: '${{!steps.release-check.outputs.IS_RELEASE}}' | |
- name: Linting | |
run: npm run format:ci | |
if: '${{!steps.release-check.outputs.IS_RELEASE}}' | |
- name: Run unit tests | |
run: npm run test:ci:vitest:unit | |
if: '${{!steps.release-check.outputs.IS_RELEASE}}' |