Skip to content

Commit 68d7b8c

Browse files
committed
chore: stop tracking .tsbuildinfo files and add to .gitignore
1 parent 7a4acf4 commit 68d7b8c

File tree

10 files changed

+152
-146
lines changed

10 files changed

+152
-146
lines changed

.github/workflows/ci.yml

Lines changed: 70 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -12,108 +12,97 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
jobs:
15-
lint:
16-
name: ⬣ ESLint
15+
setup:
16+
name: Setup
1717
runs-on: ubuntu-latest
18+
outputs:
19+
cache-hit: ${{ steps.cache-node-modules.outputs.cache-hit }}
1820
steps:
19-
- name: ⬇️ Checkout repo
20-
uses: actions/checkout@v4
21-
22-
- name: 📦 Install pnpm
23-
uses: pnpm/action-setup@v4
24-
25-
- name: ⎔ Setup Node.js
26-
uses: actions/setup-node@v4
21+
- uses: actions/checkout@v4
2722
with:
28-
node-version: 20
29-
cache: 'pnpm'
23+
fetch-depth: 2
3024

31-
- name: 📦 Install dependencies
32-
run: pnpm install --frozen-lockfile
25+
- uses: pnpm/action-setup@v4
3326

34-
- name: 🔬 Lint
35-
run: pnpm turbo run lint --affected
36-
37-
typecheck:
38-
name: ʦ TypeScript
39-
runs-on: ubuntu-latest
40-
steps:
41-
- name: ⬇️ Checkout repo
42-
uses: actions/checkout@v4
43-
44-
- name: 📦 Install pnpm
45-
uses: pnpm/action-setup@v4
46-
47-
- name: ⎔ Setup Node.js
48-
uses: actions/setup-node@v4
27+
- uses: actions/setup-node@v4
4928
with:
5029
node-version: 20
5130
cache: 'pnpm'
5231

53-
- name: 📦 Install dependencies
54-
run: pnpm install --frozen-lockfile
32+
- id: cache-node-modules
33+
uses: actions/cache@v4
34+
with:
35+
path: |
36+
node_modules
37+
packages/*/node_modules
38+
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
39+
restore-keys: |
40+
${{ runner.os }}-modules-
41+
42+
- id: cache-turbo
43+
uses: actions/cache@v4
44+
with:
45+
path: .turbo
46+
key: ${{ runner.os }}-turbo-${{ github.sha }}
47+
restore-keys: |
48+
${{ runner.os }}-turbo-
5549
56-
- name: 🔎 Type check
57-
run: pnpm turbo run type-check --affected
50+
- run: pnpm install --frozen-lockfile
51+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
5852

59-
test:
60-
name: 🧪 Test
53+
validate:
54+
name: Validate
55+
needs: setup
6156
runs-on: ubuntu-latest
6257
steps:
63-
- name: ⬇️ Checkout repo
64-
uses: actions/checkout@v4
58+
- uses: actions/checkout@v4
59+
with:
60+
fetch-depth: 2
6561

66-
- name: 📦 Install pnpm
67-
uses: pnpm/action-setup@v4
62+
- uses: pnpm/action-setup@v4
6863

69-
- name: ⎔ Setup Node.js
70-
uses: actions/setup-node@v4
64+
- uses: actions/setup-node@v4
7165
with:
7266
node-version: 20
7367
cache: 'pnpm'
7468

75-
- name: 📦 Install dependencies
76-
run: pnpm install --frozen-lockfile
77-
78-
- name: 🧪 Run tests
79-
run: pnpm turbo run test --affected
69+
- uses: actions/cache@v4
70+
with:
71+
path: |
72+
node_modules
73+
packages/*/node_modules
74+
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
75+
restore-keys: |
76+
${{ runner.os }}-modules-
77+
78+
- uses: actions/cache@v4
79+
with:
80+
path: .turbo
81+
key: ${{ runner.os }}-turbo-${{ github.sha }}
82+
restore-keys: |
83+
${{ runner.os }}-turbo-
84+
85+
- run: pnpm turbo run lint --affected
86+
- run: pnpm turbo run type-check --affected
87+
- run: pnpm turbo run build --affected
88+
- run: pnpm turbo run test --affected
89+
90+
- uses: actions/upload-artifact@v4
91+
with:
92+
name: build-artifacts
93+
path: packages/*/dist
8094

81-
build:
82-
name: 🏗 Build
95+
cache-build:
96+
name: Cache Artifacts
97+
needs: validate
8398
runs-on: ubuntu-latest
8499
steps:
85-
- name: ⬇️ Checkout repo
86-
uses: actions/checkout@v4
87-
88-
- name: 📦 Install pnpm
89-
uses: pnpm/action-setup@v4
90-
91-
- name: ⎔ Setup Node.js
92-
uses: actions/setup-node@v4
100+
- uses: actions/download-artifact@v4
93101
with:
94-
node-version: 20
95-
cache: 'pnpm'
102+
name: build-artifacts
103+
path: packages
96104

97-
- name: 📦 Install dependencies
98-
run: pnpm install --frozen-lockfile
99-
100-
- name: 🏗 Build packages
101-
run: pnpm turbo run build --affected
102-
103-
- name: 📄 Generate docs (validate examples)
104-
run: pnpm turbo run docgen --affected || echo "No docgen script found, skipping"
105-
106-
# All jobs must pass
107-
ci:
108-
name: ✅ CI
109-
runs-on: ubuntu-latest
110-
if: always()
111-
needs: [lint, typecheck, test, build]
112-
steps:
113-
- name: ✅ All jobs passed
114-
if: ${{ !(contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}
115-
run: exit 0
116-
117-
- name: ❌ Some jobs failed
118-
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
119-
run: exit 1
105+
- uses: actions/cache@v4
106+
with:
107+
path: packages/*/dist
108+
key: build-artifacts-${{ github.sha }}

.github/workflows/docs.yml

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -22,53 +22,61 @@ jobs:
2222
runs-on: ubuntu-latest
2323

2424
steps:
25-
- name: ⬇️ Checkout
26-
uses: actions/checkout@v4
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 2
28+
29+
- uses: pnpm/action-setup@v4
2730

28-
- name: ⎔ Install Node.js
29-
uses: actions/setup-node@v4
31+
- uses: actions/setup-node@v4
3032
with:
3133
node-version: 20
34+
cache: 'pnpm'
3235

33-
- name: 📦 Install pnpm
34-
uses: pnpm/action-setup@v4
36+
- id: cached-build-artifacts
37+
uses: actions/cache@v4
3538
with:
36-
run_install: false
39+
path: packages/*/dist
40+
key: build-artifacts-${{ github.sha }}
3741

38-
- name: Get pnpm store directory
39-
shell: bash
40-
run: |
41-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
42+
- id: cache-node-modules
43+
uses: actions/cache@v4
44+
with:
45+
path: |
46+
node_modules
47+
packages/*/node_modules
48+
docs/node_modules
49+
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
50+
restore-keys: |
51+
${{ runner.os }}-modules-
4252
43-
- name: Setup pnpm cache
53+
- id: cache-turbo
4454
uses: actions/cache@v4
4555
with:
46-
path: ${{ env.STORE_PATH }}
47-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
56+
path: .turbo
57+
key: ${{ runner.os }}-turbo-${{ github.sha }}
4858
restore-keys: |
49-
${{ runner.os }}-pnpm-store-
59+
${{ runner.os }}-turbo-
5060
51-
- name: 📦 Install dependencies
52-
run: pnpm install
61+
- run: pnpm install --frozen-lockfile
62+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
5363

54-
- name: 🏗 Build packages (required for docs)
55-
run: pnpm turbo run build
64+
- run: pnpm turbo run build
65+
if: steps.cached-build-artifacts.outputs.cache-hit != 'true'
5666

57-
- name: 📄 Generate Evolution SDK docs
58-
run: pnpm turbo run docgen
59-
working-directory: packages/evolution
67+
- run: pnpm turbo run docgen --filter=evolution
6068

61-
- name: 📚 Copy Evolution docs to website
62-
run: node scripts/copy-evolution-docs.mjs
63-
working-directory: docs
69+
- run: pnpm turbo run build --filter=docs
6470

65-
- name: 🏗 Build documentation
66-
run: |
67-
cd docs
68-
pnpm build
71+
- id: cache-docs-output
72+
uses: actions/cache@v4
73+
with:
74+
path: docs/out
75+
key: docs-output-${{ github.sha }}
76+
restore-keys: |
77+
docs-output-
6978
70-
- name: 📤 Upload artifact
71-
uses: actions/upload-pages-artifact@v3
79+
- uses: actions/upload-pages-artifact@v3
7280
with:
7381
path: docs/out
7482

@@ -80,6 +88,5 @@ jobs:
8088
runs-on: ubuntu-latest
8189
needs: build
8290
steps:
83-
- name: 🚀 Deploy to GitHub Pages
84-
id: deployment
91+
- id: deployment
8592
uses: actions/deploy-pages@v4

.github/workflows/release.yml

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,56 +4,68 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
id-token: write
713

814
concurrency: ${{ github.workflow }}-${{ github.ref }}
915

1016
jobs:
1117
release:
12-
name: 🚀 Release
18+
name: Release
1319
runs-on: ubuntu-latest
1420
steps:
15-
- name: ⬇️ Checkout repo
16-
uses: actions/checkout@v4
21+
- uses: actions/checkout@v4
1722
with:
18-
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
1923
fetch-depth: 0
2024

21-
- name: 📦 Install pnpm
22-
uses: pnpm/action-setup@v4
25+
- uses: pnpm/action-setup@v4
2326

24-
- name: ⎔ Setup Node.js
25-
uses: actions/setup-node@v4
27+
- uses: actions/setup-node@v4
2628
with:
2729
node-version: 20
2830
cache: 'pnpm'
2931
registry-url: 'https://registry.npmjs.org/'
3032

31-
- name: 📦 Install dependencies
32-
run: pnpm install --frozen-lockfile
33+
- id: cached-build-artifacts
34+
uses: actions/cache@v4
35+
with:
36+
path: packages/*/dist
37+
key: build-artifacts-${{ github.sha }}
3338

34-
- name: 🏗 Build packages
35-
run: pnpm turbo run build
39+
- id: cache-node-modules
40+
uses: actions/cache@v4
41+
with:
42+
path: |
43+
node_modules
44+
packages/*/node_modules
45+
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
46+
restore-keys: |
47+
${{ runner.os }}-modules-
48+
49+
- uses: actions/cache@v4
50+
with:
51+
path: .turbo
52+
key: ${{ runner.os }}-turbo-${{ github.sha }}
53+
restore-keys: |
54+
${{ runner.os }}-turbo-
3655
37-
- name: 🧪 Run tests
38-
run: pnpm turbo run test
56+
- run: pnpm install --frozen-lockfile
57+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
3958

40-
- name: 📄 Generate docs
41-
run: pnpm turbo run docgen || echo "No docgen script found, skipping"
59+
- run: pnpm turbo run build
60+
if: steps.cached-build-artifacts.outputs.cache-hit != 'true'
4261

43-
- name: 🦋 Create Release Pull Request or Publish to npm
44-
id: changesets
62+
- id: changesets
4563
uses: changesets/action@v1
4664
with:
47-
# This uses our custom publish script that builds before publishing
4865
publish: pnpm changeset-publish
4966
title: "ci(changesets): version packages"
5067
commit: "ci(changesets): version packages"
5168
createGithubReleases: true
5269
env:
5370
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
55-
56-
- name: 📢 Send a Slack notification if a publish happened
57-
if: steps.changesets.outputs.published == 'true'
58-
# You can do something when a publish happens.
59-
run: echo "A new version of Evolution SDK was published!"
71+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ dist
66
.DS_Store
77
.direnv
88
docs/out
9-
docs/.next
9+
docs/.next
10+
# TypeScript incremental compilation cache
11+
*.tsbuildinfo
12+
.tsbuildinfo/

docs/next.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const withNextra = require("nextra")({
66
module.exports = withNextra({
77
reactStrictMode: true,
88
trailingSlash: true,
9-
basePath: "",
109
output: "export",
1110
distDir: "out",
1211
images: {

0 commit comments

Comments
 (0)