Skip to content

Commit

Permalink
ci: update GitHub Actions to use Bun
Browse files Browse the repository at this point in the history
  • Loading branch information
mikerourke committed Jan 7, 2025
1 parent 78b600b commit bf8b695
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 35 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy Documentation Site

on:
Expand All @@ -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
Expand All @@ -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"
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bf8b695

Please sign in to comment.