RUM-6120 Upgrade Github action to run on Node.js 20#173
Merged
Conversation
19a58b8 to
8f60067
Compare
8f60067 to
9f38ad8
Compare
src/__tests__/main.test.ts
Outdated
| // 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.
🔴 Code Quality Violation
Suggested change
| 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.
Member
There was a problem hiding this comment.
/nit This suggestion is better than a console call IMHO
1e8f412 to
d29b3c6
Compare
src/__tests__/main.test.ts
Outdated
| // 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.
src/__tests__/main.test.ts
Outdated
| 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.
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.
949aeeb to
c46e789
Compare
c46e789 to
d24c944
Compare
maxep
approved these changes
Sep 16, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.