-
Notifications
You must be signed in to change notification settings - Fork 7
52 lines (50 loc) · 1.45 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
name: e2e
on:
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
e2e:
runs-on: ubuntu-latest
env:
ARCH: amd64
ALLURE_DOCKER_API: ${{ secrets.ALLURE_DOCKER_API }}
BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
EXECUTION_TYPE: github
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Build back
run: |
./gradlew jibDockerBuild -x :rococo-e2e:test
docker image ls
- name: Pull browsers
run: |
docker pull selenoid/vnc_chrome:125.0
- name: Get the last commit message
run: |
MESSAGE=$(git log -1 --pretty=%B)
echo "HEAD_COMMIT_MESSAGE=$MESSAGE" >> $GITHUB_ENV
- name: Run tests
id: e2e-test
run: |
docker compose -f docker-compose-e2e.yml up -d
docker wait rococo-e2e
exit_code=$(docker inspect -f '{{.State.ExitCode}}' rococo-e2e)
echo "e2e_exit_code=$exit_code" >> $GITHUB_OUTPUT
docker logs rococo-e2e
docker compose -f docker-compose-e2e.yml down
if [ "$exit_code" -eq "0" ]; then
echo "Tests passed!"
exit 0
else
echo "Tests failed!"
exit 1
fi