Skip to content

Commit 661722f

Browse files
authoredNov 16, 2023
chore: reduce renovate updates noise (#750)
1 parent 767ad39 commit 661722f

File tree

4 files changed

+57
-20
lines changed

4 files changed

+57
-20
lines changed
 

‎.github/renovate.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
"group:commitlintMonorepo"
1717
],
1818
"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+
},
2024
"labels": ["dependencies"],
2125
"osvVulnerabilityAlerts": true,
2226
"packageRules": [
@@ -67,7 +71,8 @@
6771
{
6872
"matchDepTypes": ["devDependencies"],
6973
"matchUpdateTypes": ["minor", "patch"],
70-
"automerge": true
74+
"automerge": true,
75+
"automergeType": "branch"
7176
}
7277
]
7378
}

‎.github/workflows/release.yml

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test & Release
1+
name: Release
22

33
on:
44
push:
@@ -8,16 +8,13 @@ on:
88
- '+([0-9])?(.{+([0-9]),x}).x'
99

1010
jobs:
11-
lint-and-test:
11+
test:
1212
uses: ./.github/workflows/test.yml
13-
secrets: inherit
1413

1514
release:
16-
needs: lint-and-test
15+
needs: test
1716

1817
runs-on: ubuntu-latest
19-
env:
20-
node-version: 20.x
2118

2219
steps:
2320
- name: Harden Runner
@@ -29,16 +26,24 @@ jobs:
2926
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
3027
with:
3128
persist-credentials: false
32-
- name: Use Node.js ${{ env.node-version }}
29+
30+
- name: Use Node.js LTS
3331
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
3432
with:
35-
node-version: ${{ env.node-version }}
33+
node-version: 'lts/*'
34+
cache: npm
35+
3636
- name: Install packages
3737
run: npm ci
38+
39+
- name: Audit npm signatures
40+
run: npm audit signatures
41+
3842
- name: Build project
3943
run: npm run build
44+
4045
- name: Run Semantic Release
41-
run: npm run release
46+
run: npx semantic-release
4247
env:
4348
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
4449
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

‎.github/workflows/test.yml

+35-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
1-
name: Lint & Test
1+
name: Test
22

33
on:
4-
workflow_call:
4+
push:
5+
branches:
6+
- renovate/** # branches generated by https://github.com/apps/renovate
57
pull_request:
68
branches:
79
- main
810
- beta
911
- '+([0-9])?(.{+([0-9]),x}).x'
12+
workflow_call:
1013

1114
permissions:
1215
contents: read
1316

1417
jobs:
15-
lint-and-test:
16-
runs-on: ${{ matrix.os }}
18+
test_matrix:
1719
strategy:
1820
matrix:
19-
node: [16.x, 18.x, 20.x]
2021
os: [ubuntu-latest, windows-latest, macos-latest]
22+
node: [16, 18, 20]
23+
24+
runs-on: ${{ matrix.os }}
25+
timeout-minutes: 5
2126

2227
steps:
2328
- name: Harden Runner
@@ -27,18 +32,41 @@ jobs:
2732

2833
- name: Checkout project
2934
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
35+
3036
- name: Use Node.js ${{ matrix.node }}
3137
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
3238
with:
3339
node-version: ${{ matrix.node }}
3440
cache: 'npm'
41+
3542
- name: Install packages
3643
run: npm ci
37-
- name: Build project
38-
run: npm run build
44+
45+
- name: Audit npm signatures
46+
run: npm audit signatures
47+
3948
- name: Check codestyle compliance
4049
run: npm run lint
50+
51+
- name: Build project
52+
run: npm run build
53+
4154
- name: Run tests
4255
run: npm run test
56+
4357
- name: Run fuzz tests
4458
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

‎package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
"test": "jest --coverage",
2121
"test:watch": "jest --watch --coverage",
2222
"test:fuzz": "jest --testMatch='**/*.fuzz.ts' --coverage=false --testTimeout=120000",
23-
"prepare": "husky install",
24-
"release": "semantic-release"
23+
"prepare": "husky install"
2524
},
2625
"dependencies": {
2726
"@types/luxon": "~3.3.0",

0 commit comments

Comments
 (0)
Please sign in to comment.