generated from Tinkoff/angular-open-source-starter
-
Notifications
You must be signed in to change notification settings - Fork 7
58 lines (50 loc) · 1.94 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
53
54
55
56
57
58
name: ⚙️ E2E tests
on:
pull_request:
jobs:
e2e:
if: ${{ !contains(github.head_ref , 'release/') }}
name: E2E
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npx nx prerender editor-demo
- uses: taiga-family/ci/actions/run/[email protected]
with:
port: ${{ env.NG_SERVER_PORT }}
directory: ${{ env.DIST }}
replaceBaseUrlFrom: /editor/
replaceBaseUrlTo: /
- run: npx nx e2e editor-demo-playwright -- --update-snapshots
- uses: taiga-family/ci/actions/run/[email protected]
with:
branch: snapshots/demo/next/${{ github.base_ref }}
destination: ${{ env.DIST_NEXT }}
- uses: taiga-family/ci/actions/run/[email protected]
with:
port: ${{ env.NG_SERVER_PORT }}
directory: ${{ env.DIST_NEXT }}
replaceBaseUrlFrom: /editor/
replaceBaseUrlTo: /
- run: npx nx e2e editor-demo-playwright
continue-on-error: true
- uses: actions/[email protected]
with:
path: ./projects/demo-playwright/tests-results/**/*-diff.png
name: ${{ env.PLAYWRIGHT_SNAPSHOTS_ARTIFACTS_KEY }}
if-no-files-found: ignore
compression-level: 0
retention-days: 1
- id: diff-checker
run: |
echo "diff_exist=$(find ./projects/demo-playwright/tests-results -regex '.*diff\.png$' | wc -l | sed -e 's/^[[:space:]]*//')" >> $GITHUB_OUTPUT
- if: ${{ steps.diff-checker.outputs.diff_exist != '0' }}
run: |
find ./projects/demo-playwright/tests-results -regex '.*diff\.png$' -exec echo "{}" \;
exit 1
concurrency:
group: e2e-${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true