Skip to content

Commit 5770b57

Browse files
committed
chore: modernize all github actions and update readme
1 parent 390beb2 commit 5770b57

6 files changed

Lines changed: 32 additions & 11 deletions

File tree

.github/workflows/build_pr.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ jobs:
1010
runs-on: ubuntu-latest
1111
timeout-minutes: 5
1212
steps:
13-
- uses: actions/checkout@v3
14-
- uses: actions/setup-node@v3
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
1515
with:
1616
node-version: latest
17-
registry-url: https://registry.npmjs.org/
1817
- id: node-modules-cache
19-
uses: actions/cache@v3
18+
uses: actions/cache@v4
2019
with:
2120
path: |
2221
node_modules

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ jobs:
4040

4141
steps:
4242
- name: Checkout repository
43-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4444

4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v2
47+
uses: github/codeql-action/init@v3
4848
with:
4949
languages: ${{ matrix.language }}
5050
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -58,7 +58,7 @@ jobs:
5858
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
5959
# If this step fails, then you should remove it and run the build manually (see below)
6060
- name: Autobuild
61-
uses: github/codeql-action/autobuild@v2
61+
uses: github/codeql-action/autobuild@v3
6262

6363
# ℹ️ Command-line programs to run using the OS shell.
6464
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -71,6 +71,6 @@ jobs:
7171
# ./location_of_script_within_repo/buildscript.sh
7272

7373
- name: Perform CodeQL Analysis
74-
uses: github/codeql-action/analyze@v2
74+
uses: github/codeql-action/analyze@v3
7575
with:
7676
category: "/language:${{matrix.language}}"

.github/workflows/eslint.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- uses: actions/checkout@v4
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version: latest
30+
- id: node-modules-cache
31+
uses: actions/cache@v4
32+
with:
33+
path: |
34+
node_modules
35+
key: node-modules-${{ hashFiles('package-lock.json') }}
36+
restore-keys: node-modules-
2737
- name: Install modules
2838
run: npm install
2939
- name: Run format check

.github/workflows/github-publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,21 @@ jobs:
1212
contents: read
1313
packages: write
1414
steps:
15-
- uses: actions/checkout@v3
16-
- uses: actions/setup-node@v3
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
1717
with:
1818
node-version: latest
1919
registry-url: https://npm.pkg.github.com/
2020
- id: node-modules-cache
21-
uses: actions/cache@v3
21+
uses: actions/cache@v4
2222
with:
2323
path: |
2424
node_modules
2525
key: node-modules-${{ hashFiles('package-lock.json') }}
2626
restore-keys: node-modules-
2727
- run: npm i
2828
- run: npm ci
29+
- run: npm run format:check
2930
- run: npm run lint
3031
- run: npm run build
3132
- run: npm publish

.github/workflows/nightly.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ jobs:
1818
node-version: latest
1919
registry-url: https://npm.pkg.github.com/
2020
scope: "@codebam"
21+
- id: node-modules-cache
22+
uses: actions/cache@v4
23+
with:
24+
path: |
25+
node_modules
26+
key: node-modules-${{ hashFiles('package-lock.json') }}
27+
restore-keys: node-modules-
28+
- run: npm i
2129
- run: npm ci
2230
- name: Update version
2331
run: |

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ To automate deployments, use the [Wrangler Action](https://github.com/cloudflare
140140
- `npm run format`: Format the code using Prettier.
141141
- `npm run build`: Compile TypeScript and run type checks.
142142
- `npm run test`: Run unit tests with Vitest.
143+
- `npm run lint:all`: Run linting for the root project and all subprojects.
144+
- `npm run build:all`: Run build for the root project and all subprojects.
145+
- `npm run test:all`: Run tests for the root project and all subprojects.
143146

144147
The pre-commit hook automatically runs formatting and linting on staged files (via `lint-staged`), followed by a full project type check and tests before every commit.
145148

0 commit comments

Comments
 (0)