forked from research-software-directory/RSD-as-a-service
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (60 loc) · 1.93 KB
/
e2e_tests_macos.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
59
60
61
# SPDX-FileCopyrightText: 2022 - 2023 Dusan Mijatovic (dv4all)
# SPDX-FileCopyrightText: 2022 - 2023 dv4all
# SPDX-FileCopyrightText: 2022 Dusan Mijatovic (dv4all) (dv4all)
# SPDX-FileCopyrightText: 2022 Ewan Cahen (Netherlands eScience Center) <[email protected]>
# SPDX-FileCopyrightText: 2022 Netherlands eScience Center
#
# SPDX-License-Identifier: Apache-2.0
name: e2e tests macos
on:
workflow_dispatch:
inputs:
browser:
type: choice
description: Select browser
options:
- chrome
- msedge
- firefox
- webkit
jobs:
macos-v12:
timeout-minutes: 30
name: ${{inputs.browser}} macos v12
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: get playwright version
id: playwright-version
working-directory: e2e
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package-lock.json').dependencies['@playwright/test'].version)")" >> $GITHUB_ENV
- name: cache playwright binaries
uses: actions/cache@v3
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{runner.os}}-playwright-${{env.PLAYWRIGHT_VERSION}}-${{inputs.browser}}
- name: install dependencies
working-directory: e2e
run: npm ci
- name: install browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
working-directory: e2e
run: npx playwright install chromium ${{inputs.browser}} --with-deps
- name: run e2e tests
working-directory: e2e
run: npm run e2e:${{inputs.browser}}:dev
- uses: actions/upload-artifact@v3
if: always()
with:
name: macos-playwright-report-${{inputs.browser}}
path: e2e/playwright-report/
retention-days: 30
- uses: actions/upload-artifact@v3
if: failure()
with:
name: macos browser ${{inputs.browser}} state
path: |
e2e/state/
retention-days: 30