Skip to content

Commit da232ee

Browse files
Add CI steps and bump node version (#43)
1 parent ab7e551 commit da232ee

File tree

6 files changed

+77
-3
lines changed

6 files changed

+77
-3
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Setup Node
2+
description: Setup Node with yarn and install dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Enable corepack
8+
shell: bash
9+
run: corepack enable
10+
11+
- name: Setup Node.js
12+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
13+
with:
14+
node-version-file: '.nvmrc'
15+
cache: 'yarn'
16+
17+
- name: Install dependencies
18+
shell: bash
19+
run: yarn install --immutable

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
format:
11+
name: Format
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
16+
17+
- name: Setup node
18+
uses: ./.github/actions/setup-node
19+
20+
- name: Run format
21+
run: yarn format --check
22+
23+
lint:
24+
name: Lint
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
29+
30+
- name: Setup node
31+
uses: ./.github/actions/setup-node
32+
33+
- name: Run lint
34+
run: yarn lint
35+
36+
build:
37+
name: Build
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
42+
43+
- name: Setup node
44+
uses: ./.github/actions/setup-node
45+
46+
- name: Run build
47+
run: yarn build

.github/workflows/semgrep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
# A Docker image with Semgrep installed. Do not change this.
1313
image: returntocorp/semgrep
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
1616
- run: semgrep ci
1717
env:
1818
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN_PUBLIC }}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.17.0
1+
v24.14.1

.oxlintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"plugins": ["eslint", "import", "oxc", "react", "typescript"]
2+
"plugins": ["eslint", "import", "oxc", "react", "typescript"],
3+
"categories": {
4+
"correctness": "error"
5+
}
36
}

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,11 @@ __metadata:
11151115
peerDependencies:
11161116
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
11171117
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
1118+
peerDependenciesMeta:
1119+
react:
1120+
optional: true
1121+
react-dom:
1122+
optional: true
11181123
languageName: unknown
11191124
linkType: soft
11201125

0 commit comments

Comments
 (0)