feat(user): add certification routes #2524
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: End-to-end tests | ||
on: | ||
push: | ||
branches: | ||
- "**" | ||
- "!master" | ||
env: | ||
BREVO_API_KEY: ${{ secrets.BREVO_API_KEY }} | ||
DATABASE_URL=postgres://moncomptepro:moncomptepro@localhost:5432/moncomptepro | ||
DEBOUNCE_API_KEY: ${{ secrets.DEBOUNCE_API_KEY }} | ||
FRANCECONNECT_CALLBACK_URL: ${{ secrets.DEBOUNCE_API_KEY }} | ||
INSEE_CONSUMER_KEY: ${{ secrets.INSEE_CONSUMER_KEY }} | ||
INSEE_CONSUMER_SECRET: ${{ secrets.INSEE_CONSUMER_SECRET }} | ||
ZAMMAD_TOKEN: ${{ secrets.ZAMMAD_TOKEN }} | ||
jobs: | ||
test: | ||
strategy: | ||
# don't fail the entire matrix on failure | ||
fail-fast: false | ||
matrix: | ||
e2e_test: | ||
- activate_totp | ||
- check_email_deliverability | ||
- delete_account | ||
- delete_totp | ||
- join_and_moderation | ||
- join_collectivite_territoriale_official_contact_domain | ||
- join_must_confirm | ||
- join_org_with_trackdechets_domain | ||
- join_org_with_verified_domain | ||
- join_with_code_sent_to_official_contact_email | ||
- join_with_code_sent_to_official_educ_nat_contact_email | ||
- join_with_official_contact_email | ||
- reauthenticate_on_admin_page | ||
- redirect_after_session_expiration | ||
- reset_password | ||
- set_info_after_account_provisioning | ||
- signin_from_proconnect_federation_client | ||
- signin_from_standard_client | ||
- signin_with_certification_dirigeant | ||
- signin_with_email_verification | ||
- signin_with_email_verification_renewal | ||
- signin_with_legacy_scope | ||
- signin_with_magic_link | ||
- signin_with_right_acr | ||
- signin_with_totp | ||
- signup_entreprise_unipersonnelle | ||
- update_personal_information | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: docker compose up --build --detach | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
cache: "npm" | ||
node-version-file: package.json | ||
- run: npm ci | ||
- run: npm run build:workspaces | ||
- run: npm run migrate up | ||
- run: npm run fixtures:load-ci -- cypress/e2e/${{ matrix.e2e_test }}/fixtures.sql | ||
- run: npm run update-organization-info -- 500 | ||
- name: Cypress run | ||
uses: cypress-io/[email protected] | ||
with: | ||
wait-on: http://localhost:3000/users/start-sign-in | ||
build: npm run build:assets | ||
start: npx dotenvx run -f cypress/e2e/${{ matrix.e2e_test }}/env.conf --overload -- npm start | ||
install: false | ||
spec: cypress/e2e/${{ matrix.e2e_test }}/index.cy.ts | ||
env: | ||
NODE_ENV: production | ||
# Store tests runs in case of failure | ||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: cypress-${{ matrix.e2e_test }}-screenshots | ||
path: cypress/screenshots | ||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: cypress-${{ matrix.e2e_test }}-videos | ||
path: cypress/videos |