-
Notifications
You must be signed in to change notification settings - Fork 7
80 lines (69 loc) · 2.2 KB
/
test-e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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:node-20.6.1-chrome-116.0.5845.187-1-ff-117.0-edge-116.0.1938.76-1'
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@v4
- 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 --app=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