-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
331 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
# https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml | ||
env: | ||
# 7 GiB by default on GitHub, setting to 6 GiB | ||
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | ||
NODE_OPTIONS: --max-old-space-size=6144 | ||
|
||
# Remove default permissions of GITHUB_TOKEN for security | ||
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs | ||
permissions: {} | ||
|
||
jobs: | ||
typecheck: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | ||
- run: corepack enable | ||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Typecheck | ||
run: pnpm typecheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { basename } from 'node:path' | ||
import { globby } from 'globby' | ||
import { exec } from 'tinyexec' | ||
import {consola} from 'consola' | ||
|
||
const packages = await globby([ | ||
'shared/**/package.json', | ||
'examples/**/package.json', | ||
'!**/node_modules', | ||
'!**/.nitro', | ||
'!**/.vercel', | ||
'!**/.output', | ||
], { absolute: true }) | ||
|
||
for (const pkg of packages) { | ||
const cwd = pkg.replace('/package.json', '') | ||
const options = { nodeOptions: { cwd } } | ||
|
||
await exec('nuxi', ['prepare'], options) | ||
const res = await exec('tsc', ['--noEmit'], options) | ||
const output = (res.stderr).trim() | ||
if (output) { | ||
consola.withTag(basename(cwd)).error(output) | ||
process.exit(1) | ||
} else { | ||
consola.success('type checked', basename(cwd)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "./.nuxt/tsconfig.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.