Skip to content

feat: switch to bun biome #278

feat: switch to bun biome

feat: switch to bun biome #278

Workflow file for this run

name: Test and release
# Run the workflow when a Pull Request is opened or when changes are pushed to master
on:
pull_request:
push:
branches: [main]
jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
test:
runs-on: ubuntu-latest
strategy:
matrix:
# Run the steps below with the following versions of Node.js
node-version: [20.x]
env:
DATABASE_URL: "file:./dev.db"
steps:
# Fetch the latest commit
- name: Checkout
uses: actions/checkout@v4
# Setup Bun
- name: Setup Bun
uses: oven-sh/setup-bun@v1
# Install package dependencies
- name: Install
run: bun i
# Run migrations
- name: Migrate
run: bun migrate
# Run tests
- name: Test
run: bun test
release:
# Only release on push to main
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
# Waits for test jobs for each Node.js version to complete
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install
run: bun i
- name: Release
run: bunx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}