Skip to content

Commit

Permalink
ci: enable type checking and merge some node checking into one job (r…
Browse files Browse the repository at this point in the history
…olldown#518)

<!-- Thank you for contributing! -->

### Description

<!-- Please insert your description here and provide especially info about the "what" this PR is solving -->

### Test Plan

<!-- e.g. is there anything you'd like reviewers to focus on? -->

---
  • Loading branch information
hyf0 committed Mar 10, 2024
1 parent d9736ce commit 833aeb8
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 33 deletions.
34 changes: 10 additions & 24 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,14 @@ jobs:
- name: Build
run: yarn build:node

- name: Type Check
run: yarn type-check

- name: Run Test
run: yarn test

node-format:
name: Node Format
node-validation:
name: Node Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -140,29 +143,12 @@ jobs:
- name: Install dependencies
run: yarn install

- name: Run format check
run: yarn format:ci

node-lint:
name: Node Lint
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4

- name: Install node
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: Install dependencies
run: yarn install
- name: Oxc Lint
run: yarn lint

- name: Lint Filename
run: yarn lint-filename

- name: Oxc Lint
run: yarn lint
- name: Run format check
run: yarn format:ci

1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"Rstr",
"rustc",
"smallvec",
"taplo",
"treeshake"
],
"git.ignoreLimitWarning": true,
Expand Down
8 changes: 3 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ check-rust:
cargo check --workspace

check-node:
yarn typecheck
yarn type-check

check:
just check-rust
Expand Down Expand Up @@ -78,7 +78,6 @@ lint-node:
yarn lint-filename
yarn lint
yarn prettier:ci
yarn typecheck

lint:
just lint-rust
Expand All @@ -87,20 +86,19 @@ lint:

# smoke commands allow you to run checks locally without pushing branches to the remote
smoke-rust:
just test-rust
just check-rust
just test-rust
just lint-rust

smoke-node:
just test-node
just check-node
just test-node
just lint-node

smoke:
just smoke-rust
just smoke-node


# BENCHING

setup-bench:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"toml:format": "taplo format",
"toml:ci": "taplo format --check",
"format:ci": "run-s prettier:ci toml:ci",
"typecheck": "yarn workspace @rolldown/node run typecheck",
"type-check": "yarn workspaces foreach --all --parallel run type-check",
"bench": "yarn workspace bench run bench",
"build:ts": "tsc -b tsconfig.project.json",
"docs": "cd web/docs && yarn dev",
Expand Down Expand Up @@ -78,4 +78,4 @@
"engines": {
"node": ">=18.18.0"
}
}
}
4 changes: 2 additions & 2 deletions packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"build:release": "unbuild",
"test": "vitest run",
"test:update": "vitest run -u",
"typecheck": "unbuild && tsc -p tsconfig.check.json"
"type-check": "tsc -p tsconfig.check.json"
},
"dependencies": {
"@rolldown/node-binding": "workspace:*"
Expand All @@ -38,4 +38,4 @@
"unbuild": "^2.0.0",
"vitest": "^1.3.1"
}
}
}

0 comments on commit 833aeb8

Please sign in to comment.