Skip to content

Commit 5a190f2

Browse files
author
Antti Harju
authored
Update node to 20 (#547)
1 parent 37c8b6c commit 5a190f2

File tree

7 files changed

+2680
-3304
lines changed

7 files changed

+2680
-3304
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,51 @@ jobs:
66
build:
77
runs-on: ubuntu-22.04
88
steps:
9-
- uses: actions/checkout@v4
10-
- name: Set Node.js 16.x
11-
uses: actions/setup-node@v4
12-
with:
13-
node-version: 16.x
14-
- name: "Install"
15-
run: |
16-
npm install
17-
- name: "Prettier"
18-
run: |
19-
npm run format-check
20-
- name: "Lint"
21-
run: |
22-
npm run lint
23-
- name: "Test"
24-
run: |
25-
npm run test
26-
- name: "build"
27-
run: |
28-
npm run build
29-
npm run package
9+
- uses: actions/checkout@v4
10+
- name: Set Node.js 20.x
11+
uses: actions/setup-node@v4
12+
with:
13+
node-version: 20.x
14+
- name: 'Install'
15+
run: |
16+
npm install
17+
- name: 'Prettier'
18+
run: |
19+
npm run format-check
20+
- name: 'Lint'
21+
run: |
22+
npm run lint
23+
- name: 'Test'
24+
run: |
25+
npm run test
26+
- name: 'build'
27+
run: |
28+
npm run build
29+
npm run package
3030
3131
test:
3232
runs-on: ubuntu-22.04
3333
steps:
34-
- uses: actions/checkout@v4
35-
- name: Set Node.js 16.x
36-
uses: actions/setup-node@v4
37-
with:
38-
node-version: 16.x
39-
- name: "Build action for test"
40-
run: |
41-
npm install
42-
npm run all
43-
git clean -fXd
44-
- name: Create Deployment
45-
uses: ./
46-
with:
47-
token: ${{ github.token }}
48-
environment_name: ${{ github.job }}
49-
skip_pre_action: true
34+
- uses: actions/checkout@v4
35+
- name: Set Node.js 20.x
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: 20.x
39+
- name: 'Build action for test'
40+
run: |
41+
npm install
42+
npm run all
43+
git clean -fXd
44+
- name: Create Deployment
45+
uses: ./
46+
with:
47+
token: ${{ github.token }}
48+
environment_name: ${{ github.job }}
49+
skip_pre_action: true
5050

5151
release:
5252
runs-on: ubuntu-22.04
53-
name: "Build and release action"
53+
name: 'Build and release action'
5454
needs: [build, test]
5555
steps:
5656
- uses: actions/checkout@v4
@@ -63,4 +63,4 @@ jobs:
6363
uses: smartlyio/github-actions@release-action-node-v1
6464
with:
6565
dry_run: ${{ github.event_name == 'pull_request' }}
66-
token: "${{ secrets.GITHUB_TOKEN }}"
66+
token: '${{ secrets.GITHUB_TOKEN }}'

__tests__/context.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
MAIN_HAS_RUN,
1212
DEPLOYMENT_ID
1313
} from '../src/context'
14-
import {mocked} from 'ts-jest/utils'
14+
import {mocked} from 'jest-mock'
1515
import {getInput, saveState, getState, info} from '@actions/core'
1616
import * as path from 'path'
1717
import {promises as fs} from 'fs'

__tests__/deployment.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
setDeploymentInProgress,
2222
setDeploymentEnded
2323
} from '../src/deployment'
24-
import {mocked} from 'ts-jest/utils'
24+
import {mocked} from 'jest-mock'
2525
import {getInput, saveState, getState, info} from '@actions/core'
2626
import {getOctokit} from '@actions/github'
2727

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ inputs:
4646
4747
This allows more dynamic setup of the action parameters if they
4848
need to be determined by another step in the workflow.
49-
default: "false"
49+
default: 'false'
5050
required: false
5151
runs:
52-
using: 'node16'
52+
using: 'node20'
5353
pre: 'dist/pre.js'
5454
main: 'dist/main.js'
5555
post: 'dist/post.js'

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ module.exports = {
88
'^.+\\.ts$': 'ts-jest'
99
},
1010
verbose: true
11-
}
11+
}

0 commit comments

Comments
 (0)