-
Notifications
You must be signed in to change notification settings - Fork 19
56 lines (47 loc) · 1.31 KB
/
test.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
name: Test
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.x
tools: composer:v2
- name: Install dependencies
run: npm install
- run: xvfb-run -a npm test
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'
- name: Upload test results
uses: actions/upload-artifact@v2
if: always()
with:
name: test-results
path: test-results.xml
- name: Publish Unit Test Results (Linux)
uses: EnricoMi/publish-unit-test-result-action@v2
if: always() && runner.os == 'Linux'
with:
check_name: Test Results ${{ runner.os }}
files: test-results.xml
- name: Publish Unit Test Results (Windows & Mac)
uses: EnricoMi/publish-unit-test-result-action/composite@v2
if: always() && runner.os != 'Linux'
with:
check_name: Test Results ${{ runner.os }}
files: test-results.xml