From 950c13582f32a5a6de2ba17586a94a261189893c Mon Sep 17 00:00:00 2001 From: Takashi Arai Date: Mon, 19 Jun 2023 11:07:23 -0700 Subject: [PATCH] Remove code coverage github actions. Use xvfb for display. --- .github/workflows/run-tests.yml | 34 +++++++-------------------------- src/test/suite/index.ts | 1 + 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5be70e03..bc8d4816 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -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/CodeCoverageSummary@v1.3.0 - 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: @@ -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 diff --git a/src/test/suite/index.ts b/src/test/suite/index.ts index ee71fb83..aa202549 100644 --- a/src/test/suite/index.ts +++ b/src/test/suite/index.ts @@ -15,6 +15,7 @@ import * as glob from 'glob'; import * as baseConfig from '@istanbuljs/nyc-config-typescript'; const NYC = require('nyc'); + let nyc: any = undefined; export async function run(): Promise {