-
Notifications
You must be signed in to change notification settings - Fork 7
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
RUM-6120 Upgrade Github action to run on Node.js 20 #173
Conversation
19a58b8
to
8f60067
Compare
8f60067
to
9f38ad8
Compare
src/__tests__/main.test.ts
Outdated
@@ -24,7 +24,7 @@ describe('Github Action', () => { | |||
test('with no dsym_paths parameter', async () => { | |||
// Given | |||
jest.spyOn(core, 'getInput').mockImplementation(() => 'foo') | |||
const setFailedMock = jest.spyOn(core, 'setFailed') | |||
const setFailedMock = jest.spyOn(core, 'setFailed').mockImplementation(() => {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Code Quality Violation
const setFailedMock = jest.spyOn(core, 'setFailed').mockImplementation(() => {}) | |
const setFailedMock = jest.spyOn(core, 'setFailed').mockImplementation(() => {/* empty */}) |
Empty statement. (...read more)
Empty or non-functional blocks in the code can be misleading and lead to maintenance difficulties. They can also lead to a false sense of security or functionality. While they may not directly introduce security issues, their presence can suggest that some logic or error handling is implemented when it is not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/nit This suggestion is better than a console
call IMHO
1e8f412
to
d29b3c6
Compare
src/__tests__/main.test.ts
Outdated
@@ -12,7 +12,10 @@ describe('Github Action', () => { | |||
|
|||
test('with no api_key parameter', async () => { | |||
// Given | |||
const setFailedMock = jest.spyOn(core, 'setFailed') | |||
const setFailedMock = jest.spyOn(core, 'setFailed').mockImplementation((message) => { | |||
console.log(`Mocked setFailed called with message: ${message}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/__tests__/main.test.ts
Outdated
@@ -24,7 +27,10 @@ describe('Github Action', () => { | |||
test('with no dsym_paths parameter', async () => { | |||
// Given | |||
jest.spyOn(core, 'getInput').mockImplementation(() => 'foo') | |||
const setFailedMock = jest.spyOn(core, 'setFailed') | |||
const setFailedMock = jest.spyOn(core, 'setFailed').mockImplementation((message) => { | |||
console.log(`Mocked setFailed called with message: ${message}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/__tests__/main.test.ts
Outdated
const setFailedMock = jest.spyOn(core, 'setFailed') | ||
/* eslint-disable no-console */ | ||
const setFailedMock = jest.spyOn(core, 'setFailed').mockImplementation((message) => { | ||
console.log(`Mocked setFailed called with message: ${message}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
949aeeb
to
c46e789
Compare
c46e789
to
d24c944
Compare
This PR updates the repository to use Node.js 20 in alignement with GitHub’s recent transition to Node.js 16 for GitHub Actions.
Given that we were already using Node.js 18 in the dependencies, and that Github Action doesn't support Node.js 18, it made sense to move directly to Node.js 20.