build(deps): bump @gouvfr/dsfr from 1.12.1 to 1.13.0 in /frontend #756
Workflow file for this run
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: Main CI | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
pre-commit-check: | |
name: Check pre-commit hooks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Pre-commit | |
run: pip install pre-commit | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Install Prettier | |
working-directory: ./frontend | |
run: | | |
pnpm install --frozen-lockfile | |
pnpm run format-check | |
- run: pre-commit run --all-files | |
build-backend: | |
name: Build Backend | |
uses: ./.github/workflows/build.yml | |
with: | |
image: ghcr.io/dnum-mi/basegun/basegun-backend | |
context: ./backend | |
build-frontend: | |
name: Build Frontend | |
uses: ./.github/workflows/build.yml | |
with: | |
image: ghcr.io/dnum-mi/basegun/basegun-frontend | |
context: ./frontend | |
test-backend: | |
name: Test Backend | |
needs: build-backend | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Start stack using docker compose | |
run: IMAGE_TAG=${{ needs.build-backend.outputs.image_tag }} docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d | |
- run: docker compose exec backend coverage run -m pytest | |
- run: docker compose exec backend coverage xml --ignore-errors | |
- name: Produce the coverage report | |
uses: insightsengineering/coverage-action@v2 | |
with: | |
coverage-summary-title: Backend Coverage Summary | |
path: ./backend/coverage.xml | |
publish: true | |
threshold: 80 | |
diff-storage: _xml_coverage_reports_backend | |
test-frontend-format: | |
name: Test Frontend Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Run Prettier check | |
working-directory: ./frontend | |
run: | | |
pnpm install --frozen-lockfile | |
pnpm run format-check | |
test-e2e: | |
name: Run E2E tests | |
needs: [build-backend, build-frontend] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Start stack using docker compose | |
run: IMAGE_TAG=${{ needs.build-backend.outputs.image_tag }} docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Cypress run | |
uses: cypress-io/github-action@v6 | |
with: | |
working-directory: ./frontend | |
build: pnpm run build | |
start: pnpm run start | |
command: pnpm run test:e2e-ci | |
- name: Install pycobertura | |
run: pip install pycobertura | |
- name: Generate cobertura report | |
working-directory: ./frontend | |
run: npx nyc report --reporter=cobertura | |
- name: Produce coverage report | |
uses: insightsengineering/coverage-action@v2 | |
with: | |
coverage-summary-title: Frontend Coverage Summary | |
path: ./frontend/coverage/cobertura-coverage.xml | |
publish: true | |
threshold: 75 | |
diff-storage: _xml_coverage_reports_frontend | |
- name: Send artifacts | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: cypress-screenshots | |
path: ./frontend/cypress/screenshots/ |