-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.41 KB
/
main.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
name: Tests
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-and-test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node env
uses: actions/[email protected]
with:
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0
node-version: 12.x
- name: Install [email protected]
run: npm i -g [email protected]
- name: Install Dependencies
run: npm ci
- name: Compile for test
run: npm run test-compile
- name: VSCE prepublish
run: vsce package
- name: Invoke LSP entrypoint(server.js)
run: node dist/server.js
- name: Run headless test
uses: GabrielBB/xvfb-action@v1
with:
run: npm test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: Extension Build For PR ${{ github.event.pull_request.number }}
path: ./*.vsix