-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (71 loc) · 2.44 KB
/
node.js.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
73
74
75
76
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node-version: [lts/hydrogen]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: yarn compile-tests
- name: Run e2e test
if: matrix.os != 'ubuntu-latest'
uses: coactions/setup-xvfb@v1
with:
run: yarn test-with-coverage:e2e
- name: Run unit tests
run: yarn test-with-coverage:unit
- name: Update server coverage badge
uses: codecov/codecov-action@v4
if: matrix.os == 'ubuntu-latest'
with:
files: ./packages/server/coverage/coverage-final.json
verbose: true
flags: lsp-ide-server
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Update client coverage badge
uses: codecov/codecov-action@v3
if: matrix.os == 'windows-latest'
with:
files: ./packages/client/coverage/coverage-final.json
verbose: true
flags: lsp-ide-client
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Update debugger coverage badge
uses: codecov/codecov-action@v4
if: matrix.os == 'ubuntu-latest'
with:
files: ./packages/debug-adapter/coverage/coverage-final.json
verbose: true
flags: debug-adapter
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Generate VSIX file
if: matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master'
run: |
yarn package
- name: Add VSIX to the latest release
if: matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master'
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
automatic_release_tag: 'draft'
prerelease: true
title: 'Draft'
files: |
./*.vsix