Skip to content

Commit 43fc10c

Browse files
committed
ci: lance les tests e2e dans la ci
1 parent 8100fe6 commit 43fc10c

2 files changed

Lines changed: 20 additions & 3 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: e2e-tests-workflow
2+
3+
on: push
4+
5+
jobs:
6+
e2e-test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Check out code
10+
uses: actions/checkout@v2
11+
- name: Create .env
12+
run: touch .env && echo 'RESEND_API_KEY = ${{SECRET_RESEND_API_KEY}}' >> .env && echo 'URL_CONFIRMATION_PAGE = ${{SECRET_URL_CONFIRMATION_PAGE}}' >> .env && echo 'JWT_TOKEN_KEY = ${{SECRET_JWT_TOKEN_KEY}}' >> .env
13+
- name: Launch e2e tests
14+
run: docker compose -f docker-compose.e2e.yml up --build --exit-code-from=e2e

.github/workflows/test-front.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: client-tests-workflow
22

3-
on: push
3+
on: pull_request
44

55
jobs:
66
test-client:
@@ -11,6 +11,9 @@ jobs:
1111
- name: Create .env
1212
run: cp .env.example .env
1313
- name: Run docker
14-
run: docker compose up --build --exit-code-from frontend
14+
run: docker compose up --build --exit-code-from frontend && cd frontend && npm run test
1515
- name: Goto frontend and run tests
16-
run: cd frontend && npm run test
16+
run: cd frontend && npm run test
17+
18+
- name: Integration tests
19+
run: docker-compose up --exit-code-from integrationtest integrationtest

0 commit comments

Comments
 (0)