2024-04-25 10:53:11 +00:00
|
|
|
name: E2E Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches-ignore:
|
|
|
|
- 'hotfix-*' # excludes hotfix branches
|
|
|
|
- 'release'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
CI_PIPELINE_ID: ${{github.run_number}}
|
|
|
|
steps:
|
2024-04-25 11:32:22 +00:00
|
|
|
# Docker compose needs a lot of space to build images, so we need to free up some space first in the GitHub Actions runner
|
2024-04-25 11:31:38 +00:00
|
|
|
- name: Free Disk Space (Ubuntu)
|
|
|
|
uses: jlumbroso/free-disk-space@main
|
|
|
|
with:
|
|
|
|
# this might remove tools that are actually needed,
|
|
|
|
# if set to "true" but frees about 6 GB
|
|
|
|
tool-cache: false
|
|
|
|
android: true
|
|
|
|
dotnet: true
|
|
|
|
haskell: true
|
|
|
|
large-packages: true
|
|
|
|
docker-images: true
|
|
|
|
swap-storage: true
|
2024-04-25 10:53:11 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 18.3.0
|
2024-04-27 15:55:22 +00:00
|
|
|
- run: npm run prerun && bash ./Tests/Scripts/enable-billing-env-var.sh
|
2024-04-25 10:53:11 +00:00
|
|
|
- run: npm run dev
|
2024-04-26 13:45:01 +00:00
|
|
|
- name: Wait for server to start
|
2024-06-14 09:57:19 +00:00
|
|
|
run: bash ./Tests/Scripts/status-check.sh http://localhost
|
2024-04-26 12:35:25 +00:00
|
|
|
- name: Run E2E Tests. Run docker container e2e in docker compose file
|
2024-06-27 12:10:25 +00:00
|
|
|
run: export $(grep -v '^#' config.env | xargs) && docker compose -f docker-compose.dev.yml up --exit-code-from e2e --abort-on-container-exit e2e || (docker compose -f docker-compose.dev.yml logs e2e && exit 1)
|
2024-04-26 21:04:12 +00:00
|
|
|
- name: Upload test results
|
|
|
|
uses: actions/upload-artifact@v4
|
2024-04-26 21:50:20 +00:00
|
|
|
# Run this on failure
|
|
|
|
if: failure()
|
2024-04-26 21:04:12 +00:00
|
|
|
with:
|
|
|
|
# Name of the artifact to upload.
|
|
|
|
# Optional. Default is 'artifact'
|
|
|
|
name: test-results
|
|
|
|
|
|
|
|
# A file, directory or wildcard pattern that describes what to upload
|
|
|
|
# Required.
|
|
|
|
path: |
|
2024-06-13 17:39:02 +00:00
|
|
|
./E2E
|
2024-04-26 21:04:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Duration after which artifact will expire in days. 0 means using default retention.
|
|
|
|
# Minimum 1 day.
|
|
|
|
# Maximum 90 days unless changed from the repository settings page.
|
|
|
|
# Optional. Defaults to repository settings.
|
2024-06-09 18:25:34 +00:00
|
|
|
retention-days: 7
|