Files
portfolio/.github/workflows/deploy-test.yml
dependabot[bot] c7de84732a chore(deps): Bump actions/upload-artifact in /.github/workflows
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-23 08:28:00 +00:00

62 lines
1.5 KiB
YAML

name: Unit Test
on:
push:
branches-ignore:
- main
jobs:
build-test:
runs-on: ubuntu-latest
environment: recette
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'pnpm'
- name: Install dependencies and build
run: |
pnpm install --frozen-lockfile
pnpm run build
env:
VITE_GITHUB_TOKEN: ${{ secrets.VITE_GITHUB_TOKEN }}
VITE_EMAILJS_SERVICE_ID: ${{ secrets.VITE_EMAILJS_SERVICE_ID }}
VITE_EMAILJS_TEMPLATE_ID: ${{ secrets.VITE_EMAILJS_TEMPLATE_ID }}
VITE_EMAILJS_USER_ID: ${{ secrets.VITE_EMAILJS_USER_ID }}
- name: Install Cypress binary
run: pnpx cypress install
- name: Install http-server
run: pnpm add -D http-server
- name: Start HTTP server
run: pnpx http-server ./dist -p 8080 &
env:
CI: true
- name: Run Cypress tests and Browserslist
run: pnpm run test
env:
CYPRESS_baseUrl: http://localhost:8080
- name: Upload Cypress screenshots
if: failure()
uses: actions/upload-artifact@v6
with:
name: cypress-screenshots
path: cypress/screenshots