-
Notifications
You must be signed in to change notification settings - Fork 23
56 lines (47 loc) · 1.36 KB
/
test-testmo.yml
File metadata and controls
56 lines (47 loc) · 1.36 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
name: Test (testmo)
on: [workflow_dispatch]
jobs:
test:
name: Test
runs-on: ubuntu-latest
container:
image: node:23
strategy:
fail-fast: false
matrix:
browser: ['chrome', 'firefox', 'edge']
services:
selenium:
image: selenium/standalone-${{ matrix.browser }}
options: --shm-size=2gb
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '23'
cache: 'npm'
- run: npm ci
# Check if the required variables are available
- run: |
if [[ -z "${TESTMO_URL}" ]]; then
echo "The TESTMO_URL secret is not defined for this repository"
exit 1
fi
if [[ -z "${TESTMO_TOKEN}" ]]; then
echo "The TESTMO_TOKEN secret is not defined for this repository"
exit 1
fi
env:
TESTMO_URL: ${{ secrets.TESTMO_URL }}
TESTMO_TOKEN: ${{ secrets.TESTMO_TOKEN }}
# Run tests and report results to Testmo
- run: npm run test-ci
env:
BROWSER: ${{ matrix.browser }}
TESTMO_URL: ${{ secrets.TESTMO_URL }}
TESTMO_TOKEN: ${{ secrets.TESTMO_TOKEN }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ matrix.browser }}
path: screenshots/