Files
plagin_tokens/.gitea/workflows/ci.yml
T

40 lines
1.1 KiB
YAML

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
workflow_dispatch:
jobs:
test:
runs-on: docker
steps:
- name: Checkout code
env:
CI_TOKEN: ${{ secrets.CI_TOKEN }}
run: |
git init -q
git remote add origin "http://10.8.0.52:8080/andrew/plagin_tokens.git"
if [ -n "${GITHUB_SHA:-}" ]; then
git -c http.extraheader="Authorization: token ${CI_TOKEN}" fetch -q --depth 1 origin "${GITHUB_SHA}"
else
git -c http.extraheader="Authorization: token ${CI_TOKEN}" fetch -q --depth 1 origin main
fi
git checkout -q FETCH_HEAD
- name: Install Bun
run: |
apk add --no-cache bash curl unzip
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