Skip to content

Commit

Permalink
Remove code coverage github actions. Use xvfb for display.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfdctaka committed Jun 19, 2023
1 parent 44f85ec commit 3902893
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 28 deletions.
34 changes: 7 additions & 27 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,12 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: pyvista/setup-headless-display-action@v1
- run: sudo apt-get install xvfb
- run: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & export DISPLAY=:99
- run: npm install
- run: npm run compile
- run: npm run test-coverage

- name: Copy Coverage To Predictable Location
run: cp coverage/cobertura-coverage.xml coverage.cobertura.xml

- name: Code Coverage Summary Report
uses: irongut/[email protected]
with:
filename: coverage.cobertura.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '60 80'

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md
- run: npm run test
- run: killall Xvfb || true
run-tests-win:
runs-on: windows-latest
strategy:
Expand All @@ -51,7 +30,8 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: pyvista/setup-headless-display-action@v1
- run: choco install xvfb
- run: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & set DISPLAY=:99
- run: npm install
- run: npm run compile
- run: npm run test-coverage
- run: npm run test
4 changes: 3 additions & 1 deletion src/test/suite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import * as glob from 'glob';
// @ts-ignore
import * as baseConfig from '@istanbuljs/nyc-config-typescript';

const NYC = require('nyc');
// const NYC = require('nyc');
import NYC from 'nyc';

Check failure on line 18 in src/test/suite/index.ts

View workflow job for this annotation

GitHub Actions / Tests on Ubuntu with Node 16

Could not find a declaration file for module 'nyc'. '/home/runner/work/salesforce-offline-vscode/salesforce-offline-vscode/node_modules/nyc/index.js' implicitly has an 'any' type.

Check failure on line 18 in src/test/suite/index.ts

View workflow job for this annotation

GitHub Actions / Tests on Ubuntu with Node 16

Could not find a declaration file for module 'nyc'. '/home/runner/work/salesforce-offline-vscode/salesforce-offline-vscode/node_modules/nyc/index.js' implicitly has an 'any' type.

Check failure on line 18 in src/test/suite/index.ts

View workflow job for this annotation

GitHub Actions / Tests on Ubuntu with Node 18

Could not find a declaration file for module 'nyc'. '/home/runner/work/salesforce-offline-vscode/salesforce-offline-vscode/node_modules/nyc/index.js' implicitly has an 'any' type.

let nyc: any = undefined;

export async function run(): Promise<void> {
Expand Down

0 comments on commit 3902893

Please sign in to comment.