Repository navigation
99 lines (86 loc) · 2.58 KB
/
Copy pathmain.yml
File metadata and controls
99 lines (86 loc) · 2.58 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Build Extension
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/setup-node@v1
with:
node-version: '10.18.1'
- name: Build
run: |
cd build
npm install
npm run build-ci
shell: bash
# - name: Prepare artifacts
# if: matrix.os == 'ubuntu-latest'
# run: |
# mkdir artifacts
# cp dist/*.vsix artifacts
# - name: Upload artifacts
# uses: actions/upload-artifact@master
# if: matrix.os == 'ubuntu-latest'
# with:
# name: vscode-codeql-extension
# path: artifacts
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/setup-node@v1
with:
node-version: '10.18.1'
# We have to build the dependencies in `lib` before running any tests.
- name: Build
if: matrix.os == 'windows-latest'
run: |
cd build
npm install
npm run build-ci
shell: bash
- name: Install CodeQL
if: matrix.os == 'windows-latest'
run: |
mkdir codeql-home
curl -L --silent https://github.com/github/codeql-cli-binaries/releases/latest/download/codeql.zip -o codeql-home/codeql.zip
unzip -q -o codeql-home/codeql.zip -d codeql-home
rm codeql-home/codeql.zip
shell: bash
# - name: Run unit tests (Linux)
# if: matrix.os == 'ubuntu-latest'
# run: |
# cd extensions/ql-vscode
# CODEQL_PATH=$GITHUB_WORKSPACE/codeql-home/codeql/codeql npm run test
- name: Run unit tests (Windows)
if: matrix.os == 'windows-latest'
run: |
cd extensions/ql-vscode
$env:CODEQL_PATH=$(Join-Path $env:GITHUB_WORKSPACE -ChildPath 'codeql-home/codeql/codeql.exe')
npm run test
# - name: Run integration tests (Linux)
# if: matrix.os == 'ubuntu-latest'
# run: |
# cd extensions/ql-vscode
# sudo apt-get install xvfb
# /usr/bin/xvfb-run npm run integration
- name: Run integration tests (Windows)
if: matrix.os == 'windows-latest'
run: |
cd extensions/ql-vscode
npm run integration