-
Notifications
You must be signed in to change notification settings - Fork 159
82 lines (72 loc) · 2.31 KB
/
e2e-autotest.yml
File metadata and controls
82 lines (72 loc) · 2.31 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
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 vscode-java-pack
uses: actions/checkout@v4
with:
path: vscode-java-pack
- 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
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Install autotest CLI
run: npm install -g @vscjava/vscode-autotest
- name: Run test plan(s)
shell: pwsh
working-directory: vscode-java-pack
run: |
$plan = "${{ inputs.test_plan }}"
if ($plan -and $plan -ne "") {
Write-Host "Running: $plan"
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) =========="
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: vscode-java-pack/test-results/
retention-days: 30