From 0f359e3526e07a702470a1d3d8edce5d95de5492 Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Sun, 13 Jul 2025 15:25:50 +0200 Subject: [PATCH] - apply codeQL rule - enable comment on PR with test result --- .github/workflows/ci.yml | 2 ++ __tests__/main.test.ts | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b742038..69079f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,8 @@ jobs: if: success() || failure() # always run even if the previous step fails with: report_paths: 'junit.xml' + comment: true + detailed_summary: true test: if: github.event_name == 'pull_request' diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index 9301ff5..26dbbfc 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -5,9 +5,6 @@ import * as fs from 'fs' import {clear} from '../src/transform.js' import {jest} from '@jest/globals' import { fileURLToPath } from 'url'; -import {mergeConfiguration, resolveConfiguration} from '../src/utils.js' -import {ReleaseNotesBuilder} from '../src/releaseNotesBuilder.js' -import {OfflineRepository} from '../src/repositories/OfflineRepository.js' jest.setTimeout(180000) clear() @@ -26,7 +23,7 @@ test('missing values should result in failure', () => { env: process.env } try { - cp.execSync(`node ${ip}`, options).toString() + cp.execFileSync('node', [ip], options).toString() } catch (error: unknown) { expect(true).toBe(true) } @@ -64,7 +61,7 @@ test('should write result to file', () => { const options: cp.ExecSyncOptions = { env: process.env } - const result = cp.execSync(`node ${ip}`, options).toString() + const result = cp.execFileSync('node', [ip], options).toString() // should succeed expect(result).toBeDefined() @@ -93,7 +90,7 @@ test('offline mode should work with commit mode', () => { env: process.env } - const result = cp.execSync(`node ${ip}`, options).toString() + const result = cp.execFileSync('node', [ip], options).toString() // should succeed expect(result).toBeDefined()