Skip to content

add step to run SurrealDB in GitHub Actions workflow #22

add step to run SurrealDB in GitHub Actions workflow

add step to run SurrealDB in GitHub Actions workflow #22

Workflow file for this run

name: Publish
on:
push:
branches:
- main
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
surrealdb: ["v1.5.3", "v2.0.0-alpha.3"]
steps:
- name: Install SurrealDB ${{ matrix.surrealdb }}
run: curl --proto '=https' --tlsv1.2 -sSf https://install.surrealdb.com | sh -s -- --version ${{ matrix.surrealdb }}
- name: Run SurrealDB ${{ matrix.surrealdb }}
run: surreal start --user root --pass root memory
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: bun install
- name: Bun test
run: bun test
publish:
name: Publish to jsr.io
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Publish package
run: bunx jsr publish