Skip to content

chore(deps): update devdependencies (non-major) #2467

chore(deps): update devdependencies (non-major)

chore(deps): update devdependencies (non-major) #2467

Workflow file for this run

name: Cypress CI
# Control when the action will run
on:
# Triggers the workflow on push events except for the main branch
push:
branches-ignore:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: false
jobs:
cypress:
name: Cypress
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Yarn Install and Cache
uses: graasp/graasp-deploy/.github/actions/yarn-install-and-cache@v1
with:
cypress: true
# type check
- name: Type-check code
run: tsc --noEmit
# eslint check
- name: Eslint check code
run: yarn lint
- name: Build App
run: NODE_OPTIONS=--max-old-space-size=4096 yarn build:test
shell: bash
env:
VITE_GRAASP_API_HOST: 'http://localhost:3000'
VITE_ENABLE_MOCK_API: true
VITE_PORT: 3113
VITE_VERSION: cypress-test
# use the Cypress GitHub Action to run Cypress tests within the chrome browser
- name: Cypress run
uses: cypress-io/github-action@v6
with:
install: false
# we launch the app in preview mode to avoid issues with hmr websockets from vite polluting the mocks
start: yarn preview:test
browser: chrome
quiet: true
config-file: cypress.config.ts
cache-key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
env:
VITE_GRAASP_API_HOST: 'http://localhost:3000'
VITE_ENABLE_MOCK_API: true
VITE_PORT: 3113
VITE_VERSION: cypress-test
# 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
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- name: coverage report
run: npx nyc report --reporter=text-summary