feat: update legal documents link #718
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: End-to-end tests | |
on: | |
push: | |
branches: | |
- "**" | |
- "!master" | |
env: | |
ACCESS_LOG_PATH: | |
PGUSER: api-auth | |
PGPASSWORD: api-auth | |
PGDATABASE: api-auth-test | |
PGHOST: 127.0.0.1 | |
PGPORT: 5432 | |
DATABASE_URL: postgres://api-auth:[email protected]:5432/api-auth-test | |
SENDINBLUE_API_KEY: ${{ secrets.SENDINBLUE_API_KEY }} | |
MONCOMPTEPRO_HOST: http://172.18.0.1:3000 | |
CYPRESS_MONCOMPTEPRO_HOST: http://172.18.0.1:3000 | |
DO_NOT_SEND_MAIL: "False" | |
DO_NOT_VALIDATE_MAIL: "True" | |
CONSIDER_ALL_EMAIL_DOMAINS_AS_NON_FREE: "True" | |
DO_NOT_RATE_LIMIT: "True" | |
DO_NOT_USE_ANNUAIRE_EMAILS: "True" | |
SESSION_COOKIE_SECRET: secret | |
DEBOUNCE_API_KEY: | |
SENTRY_DSN: | |
INSEE_CONSUMER_KEY: ${{ secrets.INSEE_CONSUMER_KEY }} | |
INSEE_CONSUMER_SECRET: ${{ secrets.INSEE_CONSUMER_SECRET }} | |
CYPRESS_MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }} | |
SECURE_COOKIES: "false" | |
SUPPORT_EMAIL_ADDRESS: "[email protected]" | |
jobs: | |
test: | |
strategy: | |
matrix: | |
e2e_test: | |
- join_collectivite_territoriale_official_contact_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 | |
- join_with_sponsorship | |
- signin_from_agentconnect_client | |
- signin_from_legacy_client | |
- signin_from_standard_client | |
- signin_with_magic_link | |
- signup_entreprise_unipersonnelle | |
runs-on: ubuntu-20.04 | |
services: | |
moncomptepro-standard-client: | |
image: rdubigny/moncomptepro-test-client | |
ports: | |
- 4000:4000 | |
env: | |
SITE_TITLE: moncomptepro-standard-client | |
HOST: http://localhost:4000 | |
PORT: 4000 | |
MCP_CLIENT_ID: standard_client_id | |
MCP_CLIENT_SECRET: standard_client_secret | |
MCP_PROVIDER: ${{ env.MONCOMPTEPRO_HOST }} | |
MCP_SCOPES: openid email profile organization | |
STYLESHEET_URL: '' | |
moncomptepro-agentconnect-client: | |
image: rdubigny/moncomptepro-test-client | |
ports: | |
- 4001:4001 | |
env: | |
SITE_TITLE: moncomptepro-agentconnect-client | |
HOST: http://localhost:4001 | |
PORT: 4001 | |
MCP_CLIENT_ID: agentconnect_client_id | |
MCP_CLIENT_SECRET: agentconnect_client_secret | |
MCP_PROVIDER: ${{ env.MONCOMPTEPRO_HOST }} | |
MCP_SCOPES: openid uid given_name usual_name email siren siret organizational_unit belonging_population phone chorusdt | |
MCP_ID_TOKEN_SIGNED_RESPONSE_ALG: ES256 | |
MCP_USERINFO_SIGNED_RESPONSE_ALG: ES256 | |
STYLESHEET_URL: '' | |
moncomptepro-legacy-client: | |
image: rdubigny/moncomptepro-test-client | |
ports: | |
- 4002:4002 | |
env: | |
SITE_TITLE: moncomptepro-legacy-client | |
HOST: http://localhost:4002 | |
PORT: 4002 | |
MCP_CLIENT_ID: legacy_client_id | |
MCP_CLIENT_SECRET: legacy_client_secret | |
MCP_PROVIDER: ${{ env.MONCOMPTEPRO_HOST }} | |
MCP_SCOPES: openid email profile phone organizations | |
STYLESHEET_URL: '' | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
postgres: | |
image: postgres:12.12 | |
env: | |
POSTGRES_USER: ${{ env.PGUSER }} | |
POSTGRES_PASSWORD: ${{ env.PGPASSWORD }} | |
POSTGRES_DB: ${{ env.PGDATABASE }} | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- run: npm ci | |
- run: npm install cypress@12 | |
- run: npm run migrate up | |
- run: npm run load-ci-fixtures -- cypress/fixtures/${{ matrix.e2e_test }}.sql | |
- run: npm run update-organization-info -- 2000 | |
- name: Dotenv Action | |
uses: falti/[email protected] | |
with: | |
path: cypress/env/${{ matrix.e2e_test }}.conf | |
export-variables: true | |
keys-case: bypass | |
- name: Cypress run | |
uses: cypress-io/github-action@v5 | |
with: | |
wait-on: ${{ env.MONCOMPTEPRO_HOST }}/users/start-sign-in | |
build: npm run build | |
start: npm start | |
install: false | |
spec: cypress/e2e/${{ matrix.e2e_test }}.cy.js | |
env: | |
NODE_ENV: production | |
- run: npm run delete-database | |
# Store tests runs in case of failure | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: cypress-videos | |
path: cypress/videos |