Moar unit tests! #101
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- "*" | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Checkout code | |
uses: actions/checkout@v4 | |
- name: π Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: π¦ Install dependencies | |
run: bun install | |
- name: π§ͺ Run unit tests | |
run: bun run test | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Checkout code | |
uses: actions/checkout@v4 | |
- name: π Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: π¦ Install dependencies | |
run: bun install | |
- name: β¨ Run Linter | |
run: bun run lint | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Checkout code | |
uses: actions/checkout@v4 | |
- name: π Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: π¦ Install dependencies | |
run: bun install | |
- name: π· Build for Chrome | |
run: bun run build:chrome | |
- name: π¦ Build for Firefox | |
run: bun run build:firefox | |
- name: π Upload Artifacts | |
if: github.ref == 'refs/head/main' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifacts | |
path: | | |
dist/chromium | |
dist/firefox |