From bf8b695d64ec5f55e652f73e3c2f022294771f48 Mon Sep 17 00:00:00 2001 From: Mike Rourke Date: Mon, 6 Jan 2025 18:17:07 -0600 Subject: [PATCH] ci: update GitHub Actions to use Bun --- .github/workflows/release.yaml | 16 +++++----------- .github/workflows/static.yml | 18 ++++++++---------- .github/workflows/validate.yaml | 24 ++++++++++-------------- 3 files changed, 23 insertions(+), 35 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5ad0e30..c6adec4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,22 +13,16 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup Node.js environment - uses: actions/setup-node@v4 + - name: Setup Bun + uses: oven-sh/setup-bun@v2 with: - node-version: 22 - cache: "npm" + bun-version: latest - name: Install Dependencies - run: npm install - - # Ensure a new version doesn't get published to npm if it doesn't - # pass all required checks/validation: - - name: Run Checks - run: npm run typecheck && npm run prettier:ci && npm run eslint && npm run vitest -- --run + run: bun install - name: Build - run: npm run build + run: bun run build - name: Publish to npm uses: laserware/propellant@v1.0.2 diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 458fbec..d3fd6d8 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,4 +1,3 @@ -# Simple workflow for deploying static content to GitHub Pages name: Deploy Documentation Site on: @@ -8,7 +7,6 @@ on: # Allows you to run this workflow manually from the Actions tab: workflow_dispatch: -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages: permissions: contents: read pages: write @@ -32,22 +30,22 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup Node.js environment - uses: actions/setup-node@v4 + - name: Setup Bun + uses: oven-sh/setup-bun@v2 with: - node-version: 22 + bun-version: latest - - name: Install dependencies - run: npm install + - name: Install Dependencies + run: bun install - - name: Build static files + - name: Build Static Files id: build - run: npm run docs:generate + run: bun run docs:generate - name: Setup Pages uses: actions/configure-pages@v5 - - name: Upload artifact + - name: Upload Artifact uses: actions/upload-pages-artifact@v3 with: path: "site" diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index c1230a4..0bc4236 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -10,23 +10,19 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup Node.js environment - uses: actions/setup-node@v4 + - name: Setup Bun + uses: oven-sh/setup-bun@v2 with: - node-version: 22 - cache: "npm" + bun-version: latest - - name: Install dependencies - run: npm install + - name: Install Dependencies + run: bun install - - name: ESLint - run: npm run eslint - - - name: Check Formatting - run: npm run prettier:ci + - name: Run Biome Checks + run: bun run ci - name: Check Types - run: npm run typecheck + run: bun run typecheck - - name: Run Tests - run: npm run vitest -- --run + - name: Run Unit Tests + run: bun test