-
Notifications
You must be signed in to change notification settings - Fork 250
74 lines (64 loc) · 2.01 KB
/
ci-test.yml
File metadata and controls
74 lines (64 loc) · 2.01 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
name: CI Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
ci:
name: dotnet
strategy:
fail-fast: false
matrix:
os: [ windows-latest, macos-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
env:
DOTNET_NOLOGO: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install dotnet
uses: actions/setup-dotnet@v5
with:
cache: true
cache-dependency-path: '**/*.csproj'
global-json-file: ./global.json
- name: Install PSResources
shell: pwsh
run: ./tools/installPSResources.ps1
- name: Download PowerShell install script
uses: actions/checkout@v6
with:
repository: PowerShell/PowerShell
path: pwsh
sparse-checkout: tools/install-powershell.ps1
sparse-checkout-cone-mode: false
- name: Install preview
shell: pwsh
run: ./pwsh/tools/install-powershell.ps1 -Preview -Destination ./preview
- name: Build and test
shell: pwsh
run: Invoke-Build -Configuration Release TestFull
- name: Start VS Code Tunnel if failed or in debug mode
if: ${{ failure() || runner.debug == '1' }}
#v0.0.2 - Pinned for security
uses: justingrote/vscode-action@5d495ef6156c20f1f9bb21031c15776d476c10c3
with:
#All these settings are optional
tunnel-name: 'pses-action-tunnel'
connection-timeout: 2
session-timeout: 30
no-cache-cli-auth: true
- name: Upload build artifacts
if: always()
uses: actions/upload-artifact@v5
with:
name: PowerShellEditorServices-module-${{ matrix.os }}
path: module
- name: Upload test results
uses: actions/upload-artifact@v5
if: always()
with:
name: PowerShellEditorServices-test-results-${{ matrix.os }}
path: '**/*.trx'