-
Notifications
You must be signed in to change notification settings - Fork 158
95 lines (83 loc) · 2.75 KB
/
e2e-autotest.yml
File metadata and controls
95 lines (83 loc) · 2.75 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
name: E2E AutoTest
on:
workflow_dispatch:
inputs:
test_plan:
description: "Test plan to run (leave empty for all)"
required: false
default: ""
type: string
jobs:
e2e-test:
runs-on: windows-latest
timeout-minutes: 60
steps:
- name: Checkout javaext-autotest
uses: actions/checkout@v4
with:
repository: wenytang-ms/javaext-autotest
path: javaext-autotest
- name: Checkout vscode-java (test projects)
uses: actions/checkout@v4
with:
repository: redhat-developer/vscode-java
path: vscode-java
- name: Checkout eclipse.jdt.ls (Gradle test projects)
uses: actions/checkout@v4
with:
repository: eclipse-jdtls/eclipse.jdt.ls
path: eclipse.jdt.ls
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup Java 25 (for java25 test plans)
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 25-ea
- name: Create JDK 25 path for test plans
shell: pwsh
run: |
New-Item -ItemType Junction -Path "C:\Program Files\Java\jdk-25" -Target $env:JAVA_HOME
- name: Setup Java 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Install autotest dependencies
working-directory: javaext-autotest
run: npm ci && npm run build
- name: Run test plan(s)
shell: pwsh
working-directory: javaext-autotest
run: |
$plan = "${{ inputs.test_plan }}"
if ($plan -and $plan -ne "") {
Write-Host "Running: $plan"
npx autotest run "test-plans/$plan"
} else {
Write-Host "Running all test plans..."
$plans = Get-ChildItem test-plans -Filter "*.yaml" |
Where-Object { $_.Name -ne "java-fresh-import.yaml" } |
Sort-Object Name
$failed = @()
foreach ($p in $plans) {
Write-Host "`n========== $($p.Name) =========="
npx autotest run "test-plans/$($p.Name)"
if ($LASTEXITCODE -ne 0) { $failed += $p.Name }
}
Write-Host "`n========== Summary =========="
Write-Host "Total: $($plans.Count) Failed: $($failed.Count)"
if ($failed.Count -gt 0) {
Write-Host "Failed: $($failed -join ', ')"
exit 1
}
}
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-test-results
path: javaext-autotest/test-results/
retention-days: 30