-
Notifications
You must be signed in to change notification settings - Fork 3
79 lines (68 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
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:
main:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
env:
TEST_RESOURCES: test-resources
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup NodeJS 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: npm-ci
run: npm ci
- name: npm-compile
run: npm run compile
- name: UI test (macOS, windows)
if: matrix.os != 'ubuntu-latest'
run: npm run ui-test
- name: UI test (linux)
if: matrix.os == 'ubuntu-latest'
run: xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npm run ui-test
- name: Store UI test logs
uses: actions/upload-artifact@v4
if: failure() || cancelled()
with:
name: logs-${{ matrix.os }}
path: test-resources/settings/logs/*
- name: Store UI Test screenshots
uses: actions/upload-artifact@v4
if: failure() || cancelled()
with:
name: screenshots-${{ matrix.os }}
path: test-resources/screenshots/*.png
check:
if: always()
runs-on: ubuntu-latest
name: 🚦 Status Check
needs: [main]
steps:
- name: ℹ️ Test Matrix Result
run: |
echo result = ${{ needs.main.result }}
- name: ✅ Status Check - success
if: ${{ needs.main.result == 'success' }}
run: |
echo "All tests successfully completed!"
exit 0
- name: ❌ Status Check - failure
if: ${{ needs.main.result != 'success' }}
run: |
echo "Status Check failed!"
exit 1