-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (44 loc) · 1.6 KB
/
e2e-tests.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
name: E2E-Test Pipeline
on:
workflow_dispatch:
push:
tags:
- "**"
branches:
- main
pull_request:
jobs:
e2e-tests:
timeout-minutes: 30
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup up cypress env vars
working-directory: .
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
run: |
git log --oneline -10
echo "===== COMMIT INFO ====="
touch cypress.env
echo "COMMIT_INFO_BRANCH=$BRANCH_NAME" >> cypress.env
echo "COMMIT_INFO_MESSAGE=$(git log -1 --pretty=%B | head -n 1)" >> cypress.env
echo "COMMIT_INFO_EMAIL=$(git log -1 --pretty=%ae)" >> cypress.env
echo "COMMIT_INFO_AUTHOR=$(git log -1 --pretty=%an)" >> cypress.env
echo "COMMIT_INFO_SHA=$(git rev-parse HEAD)" >> cypress.env
echo "COMMIT_INFO_TIMESTAMP=$(git log -1 --pretty=%ct)" >> cypress.env
echo "COMMIT_INFO_REMOTE=$(git remote get-url origin)" >> cypress.env
cat cypress.env
- name: Build Test Runner Image
run: docker build -f ./e2e/Dockerfile -t zwoo-e2e .
- name: Prepare Container
run: docker run -d --privileged -v ./frontend/uploads:/app/frontend/uploads --name test-runner zwoo-e2e
- name: Run E2E-Tests
run: docker exec -i test-runner sh /app/e2e/run-tests.sh ${{ secrets.CYPRESS_KEY }}
- uses: actions/upload-artifact@v4
with:
name: e2e-artifacts
path: |
./frontend/uploads