-
Notifications
You must be signed in to change notification settings - Fork 639
41 lines (33 loc) · 1.3 KB
/
docker-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
name: NestJS API CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# <database-relational-block>
- name: Run e2e tests for NestJS with TypeORM
id: relational
run: docker compose -f docker-compose.relational.ci.yaml --env-file env-example-relational -p ci-relational up --build --exit-code-from api
- name: Copy prod.log from container to host
if: ${{ failure() && steps.relational.conclusion == 'failure' }}
run: docker cp ci-relational-api-1:/usr/src/app/prod.log .
# </database-relational-block>
# <database-document-block>
- name: Run e2e tests for NestJS with Mongoose
id: document
run: docker compose -f docker-compose.document.ci.yaml --env-file env-example-document -p ci-document up --build --exit-code-from api
- name: Copy prod.log from container to host
if: ${{ failure() && steps.document.conclusion == 'failure' }}
run: docker cp ci-document-api-1:/usr/src/app/prod.log .
# </database-document-block>
- name: Upload prod.log to artifacts for debugging
if: failure()
uses: actions/upload-artifact@v4
with:
name: prod-logs
path: prod.log