-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (58 loc) · 1.69 KB
/
ci.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
name: CI
on: [push]
jobs:
test:
name: Build and test with os ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
- name: Download node.js 10.11.0 (version used in VSCode)
uses: actions/setup-node@v1
with:
node-version: 10.11.0
- name: Install deps and compile
run: |
npm install --only=dev
npm install
npm run test-compile
- name: Run tests with xvfb-run
run: xvfb-run npm run test
if: matrix.os == 'ubuntu-latest'
- name: Run tests (no xvfb, we have a gui)
run: npm run test
if: matrix.os != 'ubuntu-latest'
package:
name: Package to .vsix and upload
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v1
- name: Download node.js 10.11.0 (version used in VSCode)
uses: actions/setup-node@v1
with:
version: 10.11.0
- name: npm install deps
run: |
npm install --only=dev && npm install
- name: Install vsce from my repo
run: |
git clone https://github.com/ItsMajestiX/vscode-vsce.git
cd vscode-vsce
npm install --only=dev
npm install
tsc
cp src/vsce out/vsce
cd ..
- name: Create .vsix file
run: |
./vscode-vsce/out/vsce package
mkdir artifacts
mv *.vsix artifacts/
- name: Upload artifact
uses: actions/upload-artifact@master
with:
name: vscode-ti
path: artifacts