Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish test results #363

Merged
merged 5 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ concurrency:
group: ${{ github.workflow }}
jobs:
test:
permissions:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Low]Include permissions for the 'actions' user

The actions user account may require permissions to run some jobs. Include the 'actions' user with the appropriate permission settings.

checks: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Harden Runner
Expand All @@ -35,3 +38,9 @@ jobs:
- name: Run coverage
run: npm test -- --coverage
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
- name: Publish Test Results
uses: step-security/publish-unit-test-result-action@v1
if: always()
with:
files: |
reports/*.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
reports
*.lcov

# nyc test coverage
Expand Down
8 changes: 6 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
export default {
preset: 'ts-jest',
testEnvironment: 'node',
preset: "ts-jest",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Low]Use consistent quotation marks throughout the codebase

The code uses both single and double-quotes for string literals. Choose either single or double quotes and use them consistently throughout the codebase

testEnvironment: "node",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Low]Use consistent indentation throughout the codebase

The code uses mix of tabs and spaces for indentation. Configure the editor/IDE to use either tabs or spaces and use them consistently throughout the codebase

reporters: [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Low]Ensure consistency in casing for configuration values

The code uses different casing for configuration values like 'preset'. Choose a standard casing style for configuration values and use it consistently throughout the codebase. For example, all lower case or camel case

"default",
["jest-junit", { outputDirectory: "reports", outputName: "report.xml" }],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Low]Use descriptive configuration value names

The configuration values 'preset', 'testEnvironment', and 'reporters' are not descriptive enough. Choose more descriptive configuration value names that convey their purpose

],
};