generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 85
78 lines (69 loc) · 2.72 KB
/
mynah-ui-e2e-linux.yml
File metadata and controls
78 lines (69 loc) · 2.72 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Mynah UI - E2E Tests (Linux)
on:
workflow_call:
push:
branches:
- main
paths:
- 'mynah-ui/**'
pull_request:
paths:
- 'mynah-ui/**'
jobs:
e2e-linux:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build E2E tests Docker Image (with cache)
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' }}
uses: docker/build-push-action@v5
with:
context: ./mynah-ui
push: false
load: true
tags: mynah-ui-e2e:latest
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/mynah-ui-e2e:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/mynah-ui-e2e:buildcache,mode=max
- name: Build E2E tests Docker Image (no cache - fork PRs)
if: ${{ github.event.pull_request.head.repo.full_name != github.repository && github.event_name != 'push' }}
uses: docker/build-push-action@v5
with:
context: ./mynah-ui
push: false
load: true
tags: mynah-ui-e2e:latest
- name: Run E2E tests Docker Container
run: npm run docker:run
working-directory: ./mynah-ui
env:
WEBKIT_FORCE_COMPLEX_TEXT: 0
WEBKIT_DISABLE_COMPOSITING_MODE: 1
PLAYWRIGHT_BROWSERS_PATH: 0
- name: Extract test results from Docker container
if: always()
run: npm run docker:extract
working-directory: ./mynah-ui
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: mynah-ui-test-results
path: ./mynah-ui/ui-tests/__results__
retention-days: 30
report:
needs: e2e-linux
if: always()
uses: ./.github/workflows/mynah-ui-test-report.yml