Skip to content
Merged
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
35 changes: 35 additions & 0 deletions .github/actions/setup-pnpm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Setup pnpm"
description: "Sets up pnpm with caching"

runs:
using: composite
steps:
- name: Extract pnpm version from .tool-versions
id: pnpm-version
shell: bash
run: |
PNPM_VERSION=$(grep 'pnpm' .tool-versions | awk '{print $2}')
echo "Using pnpm version: $PNPM_VERSION"
echo "version=$PNPM_VERSION" >> $GITHUB_OUTPUT

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ steps.pnpm-version.outputs.version }}

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Restore pnpm cache
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-

- name: Install dependencies
shell: bash
run: pnpm install
82 changes: 47 additions & 35 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,49 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended", "customManagers:biomeVersions"],
"labels": ["chore: dependencies"],
"dependencyDashboard": true,
"lockFileMaintenance": {
"enabled": true
},
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch",
"automerge": true
},
{
"matchPackageNames": ["@biomejs/biome"],
"groupName": "biome",
"groupSlug": "biome",
"automerge": true
},
{
"matchPackageNames": ["@commitlint/cli", "@commitlint/config-conventional"],
"groupName": "commitlint",
"groupSlug": "commitlint",
"automerge": true
},
{
"packagePatterns": ["@types", "typescript"],
"groupName": "typescript"
},
{
"packagePatterns": ["@vitest", "vitest"],
"groupName": "vitest"
}
]
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
"customManagers:biomeVersions",
"customManagers:dockerfileVersions",
"customManagers:githubActionsVersions",
":automergeRequireAllStatusChecks",
"helpers:pinGitHubActionDigests"
],
"timezone": "America/Chicago",
"labels": ["dependencies"],
"dependencyDashboard": true,
"lockFileMaintenance": {
"enabled": true
},
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch",
"automerge": true
},
{
"matchPackageNames": ["@biomejs/biome"],
"groupName": "biome",
"groupSlug": "biome",
"automerge": true
},
{
"matchPackageNames": ["typescript", "/^@types//", "/^ts-/"],
"groupName": "TypeScript and type definitions",
"groupSlug": "typescript",
"automerge": true
},
{
"matchPackageNames": ["vitest", "@vitest/coverage-v8", "supertest", "@types/supertest"],
"groupName": "Testing packages",
"groupSlug": "testing",
"automerge": true
}
],
"prHourlyLimit": 4,
"prConcurrentLimit": 10,
"rangeStrategy": "pin",
"separateMajorMinor": true,
"separateMultipleMajor": true,
"commitMessagePrefix": "⬆️ "
}
26 changes: 0 additions & 26 deletions .github/workflows/build.yml

This file was deleted.

128 changes: 128 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
name: CI

on:
push:
branches: ["master"]
pull_request:

permissions:
contents: read
packages: write

jobs:
setup:
name: Setup and Install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup pnpm
uses: ./.github/actions/setup-pnpm

quality:
name: Code Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: biomejs/setup-biome@c016c38f26f2c4a6eb3662679143614a254263fd # v2
with:
version: latest
- run: biome ci .

build:
name: Build
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/setup-pnpm
- run: pnpm build

test:
name: Test
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/setup-pnpm
- run: pnpm test

docker:
name: Docker Build and Push
needs: [build, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0 # Fetch all history for proper versioning
# Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3
with:
driver-opts: |
image=moby/buildkit:v0.12.0
# Login to GitHub Container Registry
- name: Login to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Generate Docker metadata (tags, labels)
- name: Docker metadata
id: meta
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=${{ github.sha }}
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=ref,event=branch
type=ref,event=pr
type=sha,format=long
# Build and push
- name: Build and push
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

summary:
name: Workflow Summary
needs: [setup, quality, build, test, docker]
runs-on: ubuntu-latest
if: always() # Run even if previous jobs fail
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Generate CI Summary
run: |
echo "# 📋 CI Workflow Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

# Build info
echo "" >> $GITHUB_STEP_SUMMARY
echo "## 🔨 Build Information" >> $GITHUB_STEP_SUMMARY
echo "| Property | Value |" >> $GITHUB_STEP_SUMMARY
echo "| --- | --- |" >> $GITHUB_STEP_SUMMARY
echo "| **Repository** | ${{ github.repository }} |" >> $GITHUB_STEP_SUMMARY
echo "| **Branch/Tag** | ${{ github.ref_name }} |" >> $GITHUB_STEP_SUMMARY
echo "| **Commit** | [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) |" >> $GITHUB_STEP_SUMMARY
echo "| **Triggered by** | ${{ github.event_name }} |" >> $GITHUB_STEP_SUMMARY
echo "| **Workflow Run** | [View Details](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) |" >> $GITHUB_STEP_SUMMARY

# Docker image info (when applicable)
if [[ "${{ needs.docker.result }}" == "success" && "${{ github.event_name }}" != "pull_request" ]]; then
echo "" >> $GITHUB_STEP_SUMMARY
echo "## 🐳 Docker Image" >> $GITHUB_STEP_SUMMARY
echo "| Property | Value |" >> $GITHUB_STEP_SUMMARY
echo "| --- | --- |" >> $GITHUB_STEP_SUMMARY
echo "| **Repository** | ghcr.io/${{ github.repository }} |" >> $GITHUB_STEP_SUMMARY
echo "| **Latest Tag** | ghcr.io/${{ github.repository }}:${{ github.sha }} |" >> $GITHUB_STEP_SUMMARY
echo "| **Package URL** | [View on GitHub](https://github.com/${{ github.repository }}/pkgs/container/$(echo '${{ github.repository }}' | cut -d'/' -f2)) |" >> $GITHUB_STEP_SUMMARY
fi
22 changes: 0 additions & 22 deletions .github/workflows/code-quality.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/docker-image.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/test.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

5 changes: 0 additions & 5 deletions .husky/pre-push

This file was deleted.

1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodejs 23.9.0
pnpm 10.6.2
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "biomejs.biome"]
}
Loading