Skip to content

fix(dev.116): upgrade romcal version #69

fix(dev.116): upgrade romcal version

fix(dev.116): upgrade romcal version #69

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
defaults:
run:
working-directory: ${{ matrix.project }}
strategy:
matrix:
project:
- 'react-app'
- 'rest-api-with-express'
- 'rest-api-with-fastify'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Run linters
run: npm run lint
test-ui:
name: Test (UI)
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ matrix.project }}
strategy:
matrix:
browser:
- 'chrome'
project:
- 'react-app'
- 'rest-api-with-express'
- 'rest-api-with-fastify'
- 'html-web-page'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install Dependencies
run: npm ci --no-audit -q
- name: Run Cypress
uses: cypress-io/github-action@v6
env:
NODE_OPTIONS: '--max-old-space-size=8192'
VITE_DAY_VARIANT: 'developer'
with:
working-directory: ${{ matrix.project }}
build: npm run build -- --logLevel error
browser: ${{ matrix.browser }}
start: npm start
install: false
- uses: actions/upload-artifact@master
if: always()
with:
name: ${{ matrix.project}}-cypress-report
path: ${{ matrix.project }}/${{ matrix.project }}-cypress-report.xml
- uses: actions/upload-artifact@master
if: failure()
with:
name: ${{ matrix.project }}-screenshots
path: ${{ matrix.project }}/cypress/screenshots
- uses: actions/upload-artifact@master
if: failure()
with:
name: ${{ matrix.project }}-videos
path: ${{ matrix.project }}/cypress/videos
test-unit:
name: Test (Unit)
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ matrix.project }}
strategy:
matrix:
project:
- 'rest-api-with-express'
- 'rest-api-with-fastify'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Run Unit Tests
run: npm test -- --reporter=xunit --reporter-options output=${{matrix.project}}-unit-tests.xml
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: Test Results (${{matrix.project}})
path: ${{matrix.project}}/${{matrix.project}}-unit-tests.xml
publish-test-results:
name: "Publish Tests Results"
needs:
- test-unit
- test-ui
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
if: always()
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: "artifacts/**/*.xml"