Files
trips/.gitea/workflows/pr-checks.yml
Shaun Campbell e5c4cbc331
Some checks failed
PR Checks / lint-test-and-docker-build (pull_request) Failing after 1m10s
test) stabilize vitest db bootstrap in ci
2026-02-20 23:21:41 -05:00

45 lines
1.3 KiB
YAML

name: PR Checks
on:
pull_request:
jobs:
lint-test-and-docker-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
env:
REPO_URL: https://cloud.campbellwireless.net/git/${{ github.repository }}.git
run: |
set -eux
git init .
git remote add origin "$REPO_URL"
auth="$(printf '%s' '${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}' | base64 | tr -d '\n')"
git config --local http.https://cloud.campbellwireless.net/.extraheader "AUTHORIZATION: basic $auth"
git fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
git checkout --detach "${{ github.sha }}"
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.3'
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Generate SvelteKit files
run: bun run prepare
- name: Lint
run: bun run lint
- name: Unit tests
run: bunx --bun svelte-kit sync && bunx --bun vitest run --maxWorkers=1
- name: Build app
run: bun run build
- name: Build Docker image
run: docker build --file Dockerfile --tag trips:pr-${{ github.sha }} .