-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Coverage report posted to codecov (#156)
feat: add codecov tracking service
- Loading branch information
1 parent
b3f46ad
commit 0342212
Showing
4 changed files
with
64 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,46 @@ | ||
name: run-tests | ||
run-name: Installs project and runs project tests | ||
on: [ push, pull_request ] | ||
on: [push, pull_request] | ||
jobs: | ||
run-tests-nix: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [ 20, 22 ] | ||
name: Tests with code coverage on Ubuntu with Node ${{ matrix.node }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: | | ||
npm install | ||
npm run compile | ||
# runtTests() which downloads/installs/launches VSCode requires a screen. | ||
# Using xvfb-run to attach a virtual screen for CI running on Ubuntu. | ||
xvfb-run --server-num=99 --server-args="-screen 0 1024x768x24" npm run test-coverage | ||
shell: bash | ||
- run: killall Xvfb || true | ||
run-tests-win: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
node: [ 20, 22 ] | ||
name: Tests with code coverage on Windows with Node ${{ matrix.node }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: | | ||
# On Windows there no need for a screen for runTests() to run successfully. | ||
npm install | ||
npm run compile | ||
npm run test-coverage | ||
- run: taskkill /IM Xvfb.exe /F || true | ||
run-tests-nix: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [20, 22] | ||
name: Tests with code coverage on Ubuntu with Node ${{ matrix.node }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: | | ||
npm install | ||
npm run compile | ||
# runtTests() which downloads/installs/launches VSCode requires a screen. | ||
# Using xvfb-run to attach a virtual screen for CI running on Ubuntu. | ||
xvfb-run --server-num=99 --server-args="-screen 0 1024x768x24" npm run test-coverage | ||
shell: bash | ||
- run: killall Xvfb || true | ||
- name: Upload coverage to codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: coverage/*.json | ||
flags: lsp,extension | ||
run-tests-win: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
node: [20, 22] | ||
name: Tests with code coverage on Windows with Node ${{ matrix.node }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: | | ||
# On Windows there no need for a screen for runTests() to run successfully. | ||
npm install | ||
npm run compile | ||
npm run test-coverage | ||
- run: taskkill /IM Xvfb.exe /F || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright (c) 2024, salesforce.com, inc. | ||
# All rights reserved. | ||
# SPDX-License-Identifier: MIT | ||
# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT | ||
comment: | ||
layout: 'header, diff, tree' | ||
behavior: default | ||
require_changes: false # if true: only post the comment if coverage changes | ||
branches: null | ||
flags: null | ||
paths: null | ||
flags: | ||
extension: | ||
paths: | ||
- src/ | ||
lsp: | ||
paths: | ||
- lsp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters