-
Notifications
You must be signed in to change notification settings - Fork 73
81 lines (70 loc) · 1.96 KB
/
main.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Main CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
version: [ min, 1.73.1, 1.74.3, 1.75.1, max ]
include:
- os: macos-latest
version: max
- os: windows-latest
version: max
fail-fast: false
env:
CODE_VERSION: ${{ matrix.version }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Run Tests (windows)
if: ${{ contains(matrix.os, 'win') }}
run: |
npm run test
- name: Run Tests (macOS)
if: ${{ contains(matrix.os, 'mac') }}
run: |
npm run ci-test
- name: Run Tests (linux)
if: ${{ contains(matrix.os, 'ubuntu') }}
run: |
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npm run ci-test
- name: Upload Screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: screenshots-${{ matrix.os }}-${{ matrix.version }}
path: ${{ github.workspace }}/test/**/screenshots/*.png
check:
if: always()
runs-on: ubuntu-latest
name: Status Check
needs: [ test ]
steps:
- name: Test Matrix Result
run: |
echo result = ${{ needs.test.result }}
- name: Status Check - success
if: ${{ needs.test.result == 'success' }}
run: |
echo "All tests successfully completed!"
exit 0
- name: Status Check - failure
if: ${{ needs.test.result != 'success' }}
run: |
echo "Status Check failed!"
exit 1