Skip to content

docs: add example logs and expand custom formats guide #17

docs: add example logs and expand custom formats guide

docs: add example logs and expand custom formats guide #17

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
bun-version: [latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ matrix.bun-version }}
- name: Install dependencies
run: bun install
- name: Type check
run: bun run typecheck
- name: Run tests
run: bun test
- name: Run tests with coverage
run: bun test --coverage
if: matrix.os == 'ubuntu-latest'
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Type check
run: bun run typecheck
build:
name: Build
runs-on: ubuntu-latest
needs: [test, lint]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Build executable
run: bun build src/index.ts --compile --outfile loq
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: loq-linux
path: loq
release:
name: Release
runs-on: ubuntu-latest
needs: [build]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Build for Linux
run: bun build src/index.ts --compile --outfile dist/loq-linux
- name: Build for macOS
run: bun build src/index.ts --compile --target=bun-darwin-x64 --outfile dist/loq-macos
- name: Build for Windows
run: bun build src/index.ts --compile --target=bun-windows-x64 --outfile dist/loq-windows.exe
- name: Upload release artifacts
uses: actions/upload-artifact@v4
with:
name: loq-binaries
path: dist/
docs:
name: Deploy Documentation
runs-on: ubuntu-latest
needs: [test]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Build VitePress docs
run: bun run docs
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4