Skip to content

Modifications ressources 1.1 #2864

Modifications ressources 1.1

Modifications ressources 1.1 #2864

Workflow file for this run

name: Tests end-to-end
on:
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
end-to-end-test:
name: End-to-end tests
runs-on: ubuntu-latest
timeout-minutes: 60
env:
e2e-directory: ./e2e
datalayer-directory: ./data_layer
project-docker-directory: ./
CYPRESS_IMAGE: 'cypress/browsers:node16.16.0-chrome107-ff107'
LANG: 'fr_FR.UTF-8'
REACT_APP_CRISP_WEBSITE_ID: 96fe7866-d005-4623-80b1-bd772e99855c
GIT_HEAD_REF: ${{github.head_ref}}
GIT_SHA: ${{github.sha}}
steps:
- uses: actions/checkout@v3
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.0
- uses: supabase/setup-cli@v1
with:
version: 1.52.3
# fixe la langue de l'environnement de test : permet de faire passer les
# tests de composant utilisant des fonctions telles que toLocaleString()
- name: Set locale
run: |
sudo locale-gen ${{env.LANG}}
sudo update-locale LANG=${{env.LANG}}
- run: earthly +setup-env
- run: earthly +dev --client=yes
- run: docker restart supabase_rest_tet
- run: earthly +curl-test
# run tests into electron
- name: Cypress run
uses: cypress-io/github-action@v5
with:
working-directory: ${{env.e2e-directory}}
env:
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Upload report to GitHub
if: failure()
uses: actions/upload-artifact@master
with:
name: report-chrome
path: ${{env.e2e-directory}}/cucumber-report.html
- name: Collect docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v1
with:
dest: './logs'
- name: Tar logs
if: failure()
run: tar cvzf ./logs.tgz ./logs
- name: Upload logs to GitHub
if: failure()
uses: actions/upload-artifact@master
with:
name: logs.tgz
path: ./logs.tgz