-
-
Notifications
You must be signed in to change notification settings - Fork 148
114 lines (91 loc) · 2.7 KB
/
e2e-tests.yml
File metadata and controls
114 lines (91 loc) · 2.7 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: vfox E2E Test
on: [push]
jobs:
test-windows:
name: Test on Windows
runs-on: windows-latest
strategy:
matrix:
go-version: ['1.24']
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Check Go installation
run: go version
- name: Check PowerShell version
shell: pwsh
run: $PSVersionTable.PSVersion
- name: Run E2E Tests (PowerShell)
shell: pwsh
run: |
cd ${{ github.workspace }}
$ErrorActionPreference = "Stop"
# Run the E2E test script
& .\scripts\e2e-test.ps1 -Verbose
env:
VFOX_HOME: ${{ runner.temp }}\.vfox
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-windows-${{ matrix.go-version }}
path: ${{ runner.temp }}\.vfox
test-unix:
name: Test on Unix
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
go-version: ['1.24']
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Check Go installation
run: go version
- name: Run E2E Tests (Bash)
shell: bash
run: |
cd ${{ github.workspace }}
chmod +x ./scripts/e2e-test.sh
./scripts/e2e-test.sh
env:
VFOX_HOME: ${{ runner.temp }}/.vfox
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-${{ matrix.os }}-${{ matrix.go-version }}
path: ${{ runner.temp }}/.vfox
test-summary:
name: Test Summary
runs-on: ubuntu-latest
needs: [test-windows, test-unix]
if: always()
steps:
- name: Download all artifacts
uses: actions/download-artifact@v7
- name: Print summary
run: |
echo "E2E Tests Summary"
echo "================"
echo "Windows tests: $(ls -d test-results-windows-* 2>/dev/null | wc -l) platform(s)"
echo "Unix tests: $(ls -d test-results-* 2>/dev/null | grep -v windows | wc -l) platform(s)"
echo ""
echo "All test artifacts have been uploaded."
- name: Check test results
if: failure()
run: |
echo "Some tests failed. Please check the artifacts above."
exit 1