Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
inducingchaos committed Dec 21, 2024
1 parent 1f65931 commit 1746cb4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 50 deletions.
70 changes: 20 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,36 @@ name: CI
on: [push, pull_request]

jobs:
format:
name: Format
prebuild:
name: Pre-Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('bun.lockb') }}
- run: bun i
- run: bun run format

lint:
name: Lint
runs-on: ubuntu-latest
needs: format
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v1
- name: Initialize Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('bun.lockb') }}
- run: bun i
- run: bun run lint

typecheck:
name: Typecheck
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- uses: actions/cache@v4
- name: Cache Node Modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('bun.lockb') }}
- run: bun i
- run: bun run typecheck

commit-message:
name: Commit Message
runs-on: ubuntu-latest
needs: typecheck
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: bun i
- run: bunx commitlint --from HEAD~1 --to HEAD --verbose
- name: Install Packages
run: bun i

- name: Format
run: bun run format

- name: Lint Code
run: bun run lint

- name: Check Types
run: bun run typecheck

- name: Verify Commit
run: bunx commitlint --from HEAD~1 --to HEAD --verbose
4 changes: 4 additions & 0 deletions notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@

7. **Utilize a Lockfile**:
- **How**: Ensure you have a lockfile (`bun.lockb`) committed to your repository to maintain consistent dependency versions across builds.

- Potentially combine workflow jobs into steps
- Maybe build in workflow and pass to Vercel, or vice versa
- Maybe opt for disabling a workflow if ran locally

0 comments on commit 1746cb4

Please sign in to comment.