-
Notifications
You must be signed in to change notification settings - Fork 38
50 lines (41 loc) · 1.51 KB
/
end-to-end-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
46
47
48
49
50
name: End to end tests
on:
workflow_run:
workflows:
[
'Publish component set on test environments',
'Publish component set on acceptance',
'Publish component set on production',
]
types:
- completed
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 16.14.0
- name: Install packages
run: yarn install
- name: build component set
run: yarn build
- name: serve component set in background
run: yarn start:ci
- name: clone testing repo
working-directory: /home/runner/work
run: git clone https://oauth2:${{ secrets.GITLAB_TOKEN }}@gitlab.betty.services/code/component-set-tests.git && cd component-set-tests
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install packages
working-directory: /home/runner/work/component-set-tests
run: yarn --frozen-lockfile --ignore-scripts --ignore-engines
- name: Install Playwright
working-directory: /home/runner/work/component-set-tests
run: npx playwright install --with-deps
- name: Run tests
working-directory: /home/runner/work/component-set-tests
run: eval $(egrep -v '^#' $GITHUB_REF_NAME.env | xargs) npx playwright test --config=playwright.config.ts