-
Notifications
You must be signed in to change notification settings - Fork 13
executable file
·61 lines (58 loc) · 1.78 KB
/
Copy pathtest-e2e.yml
File metadata and controls
executable file
·61 lines (58 loc) · 1.78 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
name: E2E Tests
on:
pull_request:
concurrency:
# Every run deploys to the same QA host, so separate PRs must not overwrite
# one another while their E2E suites are running.
group: e2e-testing-optimole-qa
cancel-in-progress: false
jobs:
e2e:
if: ( github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name ) && ( github.actor != 'dependabot[bot]' )
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: |
npm ci
composer install --no-dev --prefer-dist --no-progress --no-suggest
npx playwright install --with-deps chromium firefox
- name: Make build
run: |
npm run build
- name: Make dist
run: |
npm run dist
- name: Deploy to QA
env:
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_PORT: ${{ secrets.SSH_PORT }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_PATH: ${{ secrets.SSH_PATH }}
run: ./bin/run-e2e-tests.sh
- name: Run E2E tests
id: run_tests
env:
E2E_BASE_URL: http://testing.optimole.com
run: |
npm run e2e:run
continue-on-error: false
- name: Check test results
if: steps.run_tests.outcome != 'success'
run: exit 1
- name: Upload Playwright artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-artifacts
path: |
test-results/
playwright-report/
if-no-files-found: warn
retention-days: 7