diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c94f7f4..d49052b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,7 +17,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 - run: npm ci - run: npm test - run: npm run build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe6ba7d..ec8b8ca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,9 +16,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - fetch-depth: 0 + node-version: 20 - run: npm ci - run: npm run lint - run: npm test diff --git a/test/issues.test.js b/test/issues.test.js index 95aad85..06c294c 100644 --- a/test/issues.test.js +++ b/test/issues.test.js @@ -14,7 +14,7 @@ test('issues() should check for code-of-conduct and return instructions', async await issues(octokit, issueOpened, core) expect(octokit.rest.issues.createComment).toHaveBeenCalledWith({ - body: 'Thanks for your proposal!\n\nThis group follows a Code of Conduct. In order to proceed, you need to read and agree to our [Code of Conduct](./blob/main/CODE_OF_CONDUCT.md).\n', + body: 'Thanks for your proposal!\n\nThis group follows a Code of Conduct. In order to proceed, you need to read and agree to our [Code of Conduct](./blob/main/CODE_OF_CONDUCT.md).', issue_number: 16, owner: 'gitevents', repo: 'action' @@ -24,7 +24,7 @@ test('issues() should check for code-of-conduct and return instructions', async test.skip('issues() should check for code-of-conduct', async () => { issueOpened.payload.issue.body = - "- [x] I've read and agree to the [Code of Conduct](./blob/main/CODE_OF_CONDUCT.md)\n" + "- [x] I've read and agree to the [Code of Conduct](./blob/main/CODE_OF_CONDUCT.md)" const octokit = { rest: { issues: { createComment: vi.fn() } } }