Skip to content

Commit 460506b

Browse files
release workflow fix (#1034)
* release workflow fix * adding test coverage to 80%+
1 parent 115ae21 commit 460506b

4 files changed

Lines changed: 26 additions & 8 deletions

File tree

‎.github/workflows/delete-packages-and-releases.yml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ on:
77
description: 'Tag to delete'
88
required: true
99
type: string
10-
secrets:
11-
GITHUB_TOKEN:
12-
required: true
1310
workflow_dispatch:
1411
inputs:
1512
tag:

‎.github/workflows/nightly.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,4 @@ jobs:
2121
packages: write # For publishing packages
2222
uses: Checkmarx/ast-cli-javascript-wrapper/.github/workflows/release.yml@abe950ede3b052dfc236f730cf11cc290af53d1c
2323
secrets:
24-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2524
ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }}

‎.github/workflows/release.yml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ on:
2424
default: true
2525
type: boolean
2626
secrets:
27-
GITHUB_TOKEN:
28-
required: true
2927
ECHO_LIBRARIES_ACCESS_KEY:
3028
required: true
3129
workflow_dispatch:
@@ -65,8 +63,6 @@ jobs:
6563
uses: Checkmarx/ast-cli-javascript-wrapper/.github/workflows/delete-packages-and-releases.yml@abe950ede3b052dfc236f730cf11cc290af53d1c
6664
with:
6765
tag: ${{ inputs.jsTag }}
68-
secrets:
69-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7066
if: inputs.dev == true
7167
release:
7268
name: Release JavaScript Wrapper

‎src/tests/LoggerConfigTest.test.ts‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { getLoggerWithFilePath, logger } from '../main/wrapper/loggerConfig';
2+
import * as fs from 'fs';
3+
import * as path from 'path';
4+
5+
describe('Logger Configuration', () => {
6+
it('should initialize logger with file path', () => {
7+
const tempDir = path.join(__dirname, '../../tmp');
8+
if (!fs.existsSync(tempDir)) {
9+
fs.mkdirSync(tempDir, { recursive: true });
10+
}
11+
12+
const logFilePath = path.join(tempDir, 'test.log');
13+
14+
// This should call configurationWithFile and cover line 4
15+
getLoggerWithFilePath(logFilePath);
16+
17+
expect(logger).toBeDefined();
18+
});
19+
20+
it('should initialize logger without file path', () => {
21+
// This should call configurationWithoutFile
22+
getLoggerWithFilePath();
23+
24+
expect(logger).toBeDefined();
25+
});
26+
});

0 commit comments

Comments
 (0)