File tree 4 files changed +57
-20
lines changed
4 files changed +57
-20
lines changed Original file line number Diff line number Diff line change 16
16
" group:commitlintMonorepo"
17
17
],
18
18
"schedule" : [" before 5am every weekday" , " every weekend" ],
19
- "lockFileMaintenance" : { "enabled" : true , "automerge" : true },
19
+ "lockFileMaintenance" : {
20
+ "enabled" : true ,
21
+ "automerge" : true ,
22
+ "automergeType" : " branch"
23
+ },
20
24
"labels" : [" dependencies" ],
21
25
"osvVulnerabilityAlerts" : true ,
22
26
"packageRules" : [
67
71
{
68
72
"matchDepTypes" : [" devDependencies" ],
69
73
"matchUpdateTypes" : [" minor" , " patch" ],
70
- "automerge" : true
74
+ "automerge" : true ,
75
+ "automergeType" : " branch"
71
76
}
72
77
]
73
78
}
Original file line number Diff line number Diff line change 1
- name : Test & Release
1
+ name : Release
2
2
3
3
on :
4
4
push :
8
8
- ' +([0-9])?(.{+([0-9]),x}).x'
9
9
10
10
jobs :
11
- lint-and- test :
11
+ test :
12
12
uses : ./.github/workflows/test.yml
13
- secrets : inherit
14
13
15
14
release :
16
- needs : lint-and- test
15
+ needs : test
17
16
18
17
runs-on : ubuntu-latest
19
- env :
20
- node-version : 20.x
21
18
22
19
steps :
23
20
- name : Harden Runner
@@ -29,16 +26,24 @@ jobs:
29
26
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
30
27
with :
31
28
persist-credentials : false
32
- - name : Use Node.js ${{ env.node-version }}
29
+
30
+ - name : Use Node.js LTS
33
31
uses : actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
34
32
with :
35
- node-version : ${{ env.node-version }}
33
+ node-version : ' lts/*'
34
+ cache : npm
35
+
36
36
- name : Install packages
37
37
run : npm ci
38
+
39
+ - name : Audit npm signatures
40
+ run : npm audit signatures
41
+
38
42
- name : Build project
39
43
run : npm run build
44
+
40
45
- name : Run Semantic Release
41
- run : npm run release
46
+ run : npx semantic- release
42
47
env :
43
48
GITHUB_TOKEN : ${{ secrets.CI_GITHUB_TOKEN }}
44
49
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1
- name : Lint & Test
1
+ name : Test
2
2
3
3
on :
4
- workflow_call :
4
+ push :
5
+ branches :
6
+ - renovate/** # branches generated by https://github.com/apps/renovate
5
7
pull_request :
6
8
branches :
7
9
- main
8
10
- beta
9
11
- ' +([0-9])?(.{+([0-9]),x}).x'
12
+ workflow_call :
10
13
11
14
permissions :
12
15
contents : read
13
16
14
17
jobs :
15
- lint-and-test :
16
- runs-on : ${{ matrix.os }}
18
+ test_matrix :
17
19
strategy :
18
20
matrix :
19
- node : [16.x, 18.x, 20.x]
20
21
os : [ubuntu-latest, windows-latest, macos-latest]
22
+ node : [16, 18, 20]
23
+
24
+ runs-on : ${{ matrix.os }}
25
+ timeout-minutes : 5
21
26
22
27
steps :
23
28
- name : Harden Runner
@@ -27,18 +32,41 @@ jobs:
27
32
28
33
- name : Checkout project
29
34
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
35
+
30
36
- name : Use Node.js ${{ matrix.node }}
31
37
uses : actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
32
38
with :
33
39
node-version : ${{ matrix.node }}
34
40
cache : ' npm'
41
+
35
42
- name : Install packages
36
43
run : npm ci
37
- - name : Build project
38
- run : npm run build
44
+
45
+ - name : Audit npm signatures
46
+ run : npm audit signatures
47
+
39
48
- name : Check codestyle compliance
40
49
run : npm run lint
50
+
51
+ - name : Build project
52
+ run : npm run build
53
+
41
54
- name : Run tests
42
55
run : npm run test
56
+
43
57
- name : Run fuzz tests
44
58
run : npm run test:fuzz
59
+
60
+ # separate job to set as required status check in branch protection
61
+ required_check :
62
+ runs-on : ubuntu-latest
63
+ needs :
64
+ - test_matrix
65
+ if : always()
66
+ steps :
67
+ - name : All required jobs and matrix versions passed
68
+ if : ${{ !(contains(needs.*.result, 'failure')) }}
69
+ run : exit 0
70
+ - name : Some required jobs or matrix versions failed
71
+ if : ${{ contains(needs.*.result, 'failure') }}
72
+ run : exit 1
Original file line number Diff line number Diff line change 20
20
"test" : " jest --coverage" ,
21
21
"test:watch" : " jest --watch --coverage" ,
22
22
"test:fuzz" : " jest --testMatch='**/*.fuzz.ts' --coverage=false --testTimeout=120000" ,
23
- "prepare" : " husky install" ,
24
- "release" : " semantic-release"
23
+ "prepare" : " husky install"
25
24
},
26
25
"dependencies" : {
27
26
"@types/luxon" : " ~3.3.0" ,
You can’t perform that action at this time.
0 commit comments