34 lines
890 B
YAML
34 lines
890 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main, develop]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: docker
|
|
steps:
|
|
- name: Checkout code
|
|
run: |
|
|
git init -q
|
|
git remote add origin "${GITHUB_SERVER_URL:-http://10.8.0.52:8080}/$GITHUB_REPOSITORY.git"
|
|
git fetch -q --depth 1 origin "$GITHUB_SHA"
|
|
git checkout -q FETCH_HEAD
|
|
- name: Install Bun
|
|
run: |
|
|
apk add --no-cache git curl unzip bash
|
|
if ! command -v bun >/dev/null 2>&1; then
|
|
curl -fsSL https://bun.sh/install | bash
|
|
cp -f /root/.bun/bin/bun /usr/local/bin/bun
|
|
fi
|
|
bun --version
|
|
- name: Install dependencies
|
|
run: bun install
|
|
- name: TypeScript type checking
|
|
run: bun run typecheck
|
|
- name: Run tests
|
|
run: bun run test
|