build(deps): bump nanoid from 3.3.7 to 3.3.8 #1182
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: Javascript testing | |
on: | |
- push | |
- pull_request | |
jobs: | |
test: | |
name: Run unit tests using Vitest | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- name: Install dependencides | |
run: >- | |
npm ci --legacy-peer-deps | |
- name: Run unit tests | |
run: >- | |
npm run test:unit -- --coverage | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
os: linux | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true # build should fail if Codecov runs into an error during upload | |
cypress: | |
name: Run Cypress tests | |
runs-on: ubuntu-latest | |
container: | |
image: cypress/browsers:node-20.10.0-chrome-121.0.6167.85-1-ff-118.0.2-edge-118.0.2088.46-1 | |
options: --user 1001 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- name: Install dependencides | |
run: >- | |
npm ci --legacy-peer-deps | |
- name: Cypress run | |
uses: cypress-io/github-action@v6 | |
with: | |
start: npm run start:host | |
wait-on: http://localhost:5173/ | |
spec: 'tests/e2e/**/*' | |
config-file: cypress.config.js | |
config: video=false | |
install: false | |
browser: chrome | |
# after the test run completes | |
# store any screenshots | |
# NOTE: screenshots will be generated only if E2E test failed | |
# thus we store screenshots only on failures | |
# Alternative: create and commit an empty cypress/screenshots folder | |
# to always have something to upload | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: tests/e2e/screenshots |