-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
04987a2
commit 89cb378
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: API E2E tests | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- reopened | ||
- synchronize | ||
|
||
jobs: | ||
runE2ETests: | ||
name: Run E2E tests | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./packages/api | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Start docker containers | ||
run: | | ||
docker-compose -f "docker-compose.e2e.yaml" up -d --build | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: | | ||
npm ci --ignore-scripts | ||
- name: Run e2e tests | ||
run: | | ||
npm run test:e2e | ||
- name: Publish Test Results | ||
uses: EnricoMi/publish-unit-test-result-action/composite@v2 | ||
if: always() | ||
with: | ||
files: "e2e-junit.xml" | ||
check_run_annotations: all tests, skipped tests | ||
report_individual_runs: "true" | ||
check_name: API E2E Test Results | ||
|
||
- name: Stop containers | ||
if: always() | ||
run: docker-compose -f "docker-compose.e2e.yaml" down |