-
Notifications
You must be signed in to change notification settings - Fork 498
80 lines (69 loc) · 2.26 KB
/
ci-test.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
80
name: CI Tests
on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
merge_group:
types: [checks_requested]
jobs:
ci:
name: node
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
DOTNET_NOLOGO: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
DISPLAY: ':99.0'
timeout-minutes: 10
steps:
- name: Checkout PowerShellEditorServices
uses: actions/checkout@v4
with:
repository: PowerShell/PowerShellEditorServices
path: PowerShellEditorServices
- name: Checkout vscode-powershell
uses: actions/checkout@v4
with:
path: vscode-powershell
- name: Validate snippets JSON file
shell: pwsh
run: $null = ConvertFrom-Json -InputObject (Get-Content -Raw -Path './snippets/PowerShell.json')
working-directory: vscode-powershell
- name: Install dotnet
uses: actions/setup-dotnet@v4
with:
cache: true
cache-dependency-path: PowerShellEditorServices/**/*.csproj
global-json-file: PowerShellEditorServices/global.json
config-file: PowerShellEditorServices/nuget.config
- name: Install PSResources
shell: pwsh
run: ./vscode-powershell/tools/installPSResources.ps1
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: vscode-powershell/package-lock.json
- name: Start X virtual framebuffer
if: matrix.os == 'ubuntu-latest'
run: /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Build, test and package
shell: pwsh
run: Invoke-Build -Configuration Release
working-directory: vscode-powershell
- name: Upload build artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: vscode-powershell-vsix-${{ matrix.os }}
path: '**/*.vsix'
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: vscode-powershell-test-results-${{ matrix.os }}
path: '**/test-results.xml'