-
Notifications
You must be signed in to change notification settings - Fork 13
77 lines (72 loc) · 2.12 KB
/
ci.yaml
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
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
name: Build with released version of Kaoto
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
env:
CODE_VERSION: max
TEST_RESOURCES: test-resources
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: yarn
run: yarn --network-timeout 1000000
- name: yarn build:dev
run: yarn build:dev
- name: yarn build:prod
run: yarn build:prod
- name: vsix package
run: yarn vsce package --no-dependencies --yarn
- name: Run Unit tests on Linux
run: xvfb-run -a yarn test:unit
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Run Unit tests on Other OSes than Linux
run: yarn test:unit
if: ${{ matrix.os != 'ubuntu-latest' }}
- name: Run UI Tests on Linux
run: xvfb-run -a yarn run test:it:with-prebuilt-vsix
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Run UI Tests on Other OSes than Linux
run: yarn run test:it:with-prebuilt-vsix
if: ${{ matrix.os != 'ubuntu-latest' }}
- name: Generate SBOM
if: matrix.os == 'ubuntu-latest'
run: |
npm install -g @cyclonedx/cdxgen
cdxgen -o manifest.json
- name: Store SBOM
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest'
with:
name: sbom
path: manifest.json
- name: Archive vsix
uses: actions/upload-artifact@v4
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
name: 'vscode-kaoto-vsix'
path: '*.vsix'
- name: Store VS Code logs
uses: actions/upload-artifact@v4
if: always()
with:
name: vscode-logs-${{ matrix.os }}
path: test-resources/settings/logs
- name: Store VS Code UI Tests screenshots on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: ui-test-screenshots-${{ matrix.os }}
path: test-resources/screenshots