Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 47 additions & 4 deletions .github/workflows/test.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Tests
name: CI

on:
push:
Expand All @@ -17,21 +17,61 @@
- name: Checkout code
uses: actions/checkout@v4

- name: Parse .tool-versions
uses: wistia/parse-tool-versions@v2.1.1

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.20
bun-version: '${{ env.BUN }}'

- name: Install dependencies
run: bun install

- name: Run unit tests
run: bun test:unit

lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Parse .tool-versions
uses: wistia/parse-tool-versions@v2.1.1

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: '${{ env.BUN }}'

- name: Run linters and formatters
run: |
bun install
bun run format
bun run lint:fix
bun run lint

- name: Fail if source files changed
run: |
# Check for changes excluding bun.lock (platform-specific)
CHANGED_FILES=$(git status --porcelain | grep -v "bun.lock" || true)

if [[ -z "$CHANGED_FILES" ]]; then
echo "✅ No source file changes detected."
exit 0
fi

echo "❌ Code is not properly formatted. Please run 'bun run format && bun run lint:fix' and commit the changes."
echo "$CHANGED_FILES"
exit 1

integration-tests:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: Integration Tests
runs-on: ubuntu-latest
needs: unit-tests # run after unit tests pass
needs: unit-tests # run after unit tests pass

# these are placeholders which is fine for integration tests
env:
Expand All @@ -54,10 +94,13 @@
- name: Checkout code
uses: actions/checkout@v4

- name: Parse .tool-versions
uses: wistia/parse-tool-versions@v2.1.1

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.20
bun-version: '${{ env.BUN }}'

- name: Install dependencies
run: bun install
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bun 1.2.20
17 changes: 17 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const compat = new FlatCompat({
})

const eslintConfig = [
{ ignores: ['.next/'] },
...compat.config({
extends: ['next/core-web-vitals', 'next/typescript'],
plugins: ['eslint-plugin-prettier'],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"build": "next build --turbopack",
"start": "next start | pino-pretty --colorize",
"preview": "next build --turbopack && next start | pino-pretty --colorize",
"lint": "next lint",
"lint:fix": "next lint --fix",
"lint": "eslint",
"lint:fix": "eslint --fix",
"format": "prettier --write .",
"prebuild": "bun scripts:check-app-env",
"<<<<<<< Development Tools": "",
Expand Down
Loading
Loading