Skip to content

Commit dd2ee69

Browse files
authored
Merge pull request #4 from lambda-curry/codegen-bot/add-github-actions-1754515387
2 parents e5c169f + d933ce1 commit dd2ee69

File tree

3 files changed

+186
-0
lines changed

3 files changed

+186
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 'Bun Install'
2+
description: 'Install dependencies with Bun and cache'
3+
4+
inputs:
5+
bun-version:
6+
description: 'Bun version to use'
7+
required: false
8+
default: '1.2.19'
9+
cache-key:
10+
description: 'Cache key for dependencies'
11+
required: false
12+
default: ''
13+
14+
runs:
15+
using: 'composite'
16+
steps:
17+
- name: Setup Bun
18+
uses: oven-sh/setup-bun@v2
19+
with:
20+
bun-version: ${{ inputs.bun-version }}
21+
22+
- name: Cache dependencies
23+
uses: actions/cache@v4
24+
if: inputs.cache-key != ''
25+
with:
26+
path: ~/.bun
27+
key: ${{ inputs.cache-key }}
28+
restore-keys: |
29+
${{ runner.os }}-deps-
30+
31+
- name: Install dependencies
32+
shell: bash
33+
run: bun install --frozen-lockfile
34+

.github/workflows/ci.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
env:
13+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
14+
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
15+
16+
jobs:
17+
validate:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 15
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Bun
27+
uses: oven-sh/setup-bun@v2
28+
with:
29+
bun-version: '1.2.19'
30+
31+
- name: Cache dependencies
32+
uses: actions/cache@v4
33+
with:
34+
path: ~/.bun
35+
key: ${{ runner.os }}-deps-${{ hashFiles('**/bun.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-deps-
38+
39+
- name: Install dependencies
40+
run: bun install --frozen-lockfile
41+
42+
- name: 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-
49+
50+
- name: Run Turbo lint
51+
run: bun run turbo lint
52+
53+
- name: Run Turbo build
54+
run: bun run turbo build
55+
56+
- name: Run Turbo typecheck
57+
run: bun run turbo typecheck
58+
59+
- name: Run Turbo tests
60+
run: bun run turbo test:ci
61+
62+
- name: Summary
63+
run: |
64+
echo "## Main Branch Validation Summary" >> $GITHUB_STEP_SUMMARY
65+
echo "✅ Linting passed (Biome)" >> $GITHUB_STEP_SUMMARY
66+
echo "✅ Build successful" >> $GITHUB_STEP_SUMMARY
67+
echo "✅ TypeScript compilation passed" >> $GITHUB_STEP_SUMMARY
68+
echo "✅ Tests passed" >> $GITHUB_STEP_SUMMARY
69+
echo "✅ All checks completed with Turbo caching" >> $GITHUB_STEP_SUMMARY
70+
echo "✅ Ready for deployment" >> $GITHUB_STEP_SUMMARY
71+
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: PR Quality Checks
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'apps/**'
7+
- 'packages/**'
8+
- '*.json'
9+
- '*.js'
10+
- '*.ts'
11+
- '*.tsx'
12+
- 'bun.lock'
13+
- 'turbo.json'
14+
- 'biome.json'
15+
- '!**/*.md'
16+
- '!**/*.txt'
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
20+
cancel-in-progress: true
21+
22+
env:
23+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
24+
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
25+
26+
jobs:
27+
quality-checks:
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 15
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
36+
- name: Setup Bun
37+
uses: oven-sh/setup-bun@v2
38+
with:
39+
bun-version: '1.2.19'
40+
41+
- name: Cache dependencies
42+
uses: actions/cache@v4
43+
with:
44+
path: ~/.bun
45+
key: ${{ runner.os }}-deps-${{ hashFiles('**/bun.lock') }}
46+
restore-keys: |
47+
${{ runner.os }}-deps-
48+
49+
- name: Install dependencies
50+
run: bun install --frozen-lockfile
51+
52+
- name: Cache Turbo
53+
uses: actions/cache@v4
54+
with:
55+
path: .turbo
56+
key: ${{ runner.os }}-turbo-${{ github.ref_name }}-${{ github.sha }}
57+
restore-keys: |
58+
${{ runner.os }}-turbo-${{ github.ref_name }}-
59+
${{ runner.os }}-turbo-
60+
61+
- name: Run Turbo lint
62+
run: bun run turbo lint
63+
64+
- name: Run Turbo build
65+
run: bun run turbo build
66+
67+
- name: Run Turbo typecheck
68+
run: bun run turbo typecheck
69+
70+
- name: Run Turbo tests
71+
run: bun run turbo test:ci
72+
73+
- name: Summary
74+
run: |
75+
echo "## PR Quality Checks Summary" >> $GITHUB_STEP_SUMMARY
76+
echo "✅ Linting passed (Biome)" >> $GITHUB_STEP_SUMMARY
77+
echo "✅ Build successful" >> $GITHUB_STEP_SUMMARY
78+
echo "✅ TypeScript compilation passed" >> $GITHUB_STEP_SUMMARY
79+
echo "✅ Tests passed" >> $GITHUB_STEP_SUMMARY
80+
echo "✅ All checks completed with Turbo caching" >> $GITHUB_STEP_SUMMARY
81+

0 commit comments

Comments
 (0)