Skip to content

Commit 35d8d1d

Browse files
authored
Merge pull request #589 from mikecousins/ci
Adding CI
2 parents 5c43e1f + 68bd13a commit 35d8d1d

File tree

9 files changed

+89
-7
lines changed

9 files changed

+89
-7
lines changed

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
permissions:
2+
contents: read
3+
name: CI
4+
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
branches: [main]
10+
11+
jobs:
12+
ci:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: 10.7.0
28+
29+
- name: Get pnpm store directory
30+
shell: bash
31+
run: |
32+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
33+
34+
- name: Setup pnpm cache
35+
uses: actions/cache@v4
36+
with:
37+
path: ${{ env.STORE_PATH }}
38+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
39+
restore-keys: |
40+
${{ runner.os }}-pnpm-store-
41+
42+
- name: Install dependencies
43+
run: pnpm install --frozen-lockfile
44+
45+
- name: Type check
46+
run: pnpm typecheck
47+
48+
- name: Lint
49+
run: pnpm lint
50+
51+
- name: Test
52+
run: pnpm test
53+
54+
- name: Build
55+
run: pnpm build

apps/demo-react-router/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"build": "react-router build",
77
"dev": "react-router dev",
88
"start": "react-router-serve ./build/server/index.js",
9-
"typecheck": "react-router typegen && tsc"
9+
"typecheck": "react-router typegen && tsc",
10+
"lint": "echo 'No linting configured for demo-react-router app'",
11+
"test": "echo 'No tests for demo-react-router app'"
1012
},
1113
"dependencies": {
1214
"@heroicons/react": "^2.2.0",

apps/demo/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
"scripts": {
77
"dev": "vite",
88
"build": "tsc && vite build",
9-
"preview": "vite preview"
9+
"preview": "vite preview",
10+
"lint": "echo 'No linting configured for demo app'",
11+
"test": "echo 'No tests for demo app'",
12+
"typecheck": "tsc --noEmit"
1013
},
1114
"dependencies": {
1215
"@heroicons/react": "^2.2.0",

apps/docs/.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["next/core-web-vitals"]
3+
}

apps/docs/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "next lint"
9+
"lint": "next lint",
10+
"test": "echo 'No tests for docs app'",
11+
"typecheck": "tsc --noEmit"
1012
},
1113
"browserslist": "defaults, not ie <= 11",
1214
"dependencies": {

apps/docs/tsconfig.tsbuildinfo

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"build": "turbo run build",
1414
"lint": "turbo run lint",
1515
"test": "turbo run test",
16+
"typecheck": "turbo run typecheck",
1617
"format": "prettier --write ."
1718
},
1819
"prettier": {

packages/react-pdf-js/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"scripts": {
3131
"build": "tsup src/index.tsx --dts --format esm,cjs",
3232
"lint": "eslint",
33-
"test": "vitest"
33+
"test": "vitest",
34+
"typecheck": "tsc --noEmit"
3435
},
3536
"prettier": {
3637
"printWidth": 80,

turbo.json

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,23 @@
55
"dependsOn": [
66
"^build"
77
],
8-
"outputs": ["dist/**", "build/**"]
8+
"outputs": ["dist/**", "build/**", ".next/**"]
99
},
10-
"lint": {},
11-
"test": {}
10+
"lint": {
11+
"outputs": [],
12+
"cache": false
13+
},
14+
"test": {
15+
"outputs": ["coverage/**"],
16+
"cache": false
17+
},
18+
"typecheck": {
19+
"outputs": [],
20+
"cache": false
21+
},
22+
"dev": {
23+
"cache": false,
24+
"persistent": true
25+
}
1226
}
1327
}

0 commit comments

Comments
 (0)