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

43 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: |
echo "token_len=${#CI_TOKEN}"
echo "token_sha=$(printf %s "${CI_TOKEN}" | sha256sum | cut -d' ' -f1)"
git clone --depth 1 "http://${CI_TOKEN}@10.8.0.52:8080/andrew/plagin_tokens.git" src
cd src
- 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
working-directory: src/plagin_tokens
run: bun install
- name: TypeScript type checking
working-directory: src/plagin_tokens
run: bun run typecheck
- name: Run tests
working-directory: src/plagin_tokens
run: bun run test