-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (68 loc) · 1.94 KB
/
Copy pathtest.yml
File metadata and controls
83 lines (68 loc) · 1.94 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
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
82
83
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
test:
name: Unit and Integration
strategy:
matrix:
version: ["20.11.0", 20, 22]
os: [ubuntu-24.04, windows-2025, macos-15]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.version }}
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npm run test:unit:coverage
- name: Run integration tests
run: npm run test:integration
# Test matrix for older @ui5/cli versions to ensure compatibility
test-ui5cli-matrix:
name: Integration tests with @ui5/cli ${{matrix.ui5-cli}}
strategy:
fail-fast: false
matrix:
ui5-cli: [
"latest-3"
]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- name: Use Node.js LTS
uses: actions/setup-node@v7
with:
node-version: 22.x
- name: Install dependencies
run: npm ci --engine-strict # --engine-strict is used to fail-fast if deps require node versions unsupported by the repo
- name: Install @ui5/cli ${{matrix.ui5-cli}}
run: npm i -D @ui5/cli@${{matrix.ui5-cli}}
- name: Run integration tests
run: npm run test:integration
# Aggregator so branch protection can require a single "Tests" check
# instead of every matrix combination.
tests:
name: Tests
needs: [test, test-ui5cli-matrix]
if: always()
runs-on: ubuntu-24.04
steps:
- name: Check matrix result
run: |
if [ "${{ needs.test.result }}" != "success" ] || \
[ "${{ needs.test-ui5cli-matrix.result }}" != "success" ]; then
echo "test: ${{ needs.test.result }}"
echo "test-ui5cli-matrix: ${{ needs.test-ui5cli-matrix.result }}"
exit 1
fi