ci: use self-hosted docker runner (my-runner) with Bun
This commit is contained in:
+17
-18
@@ -2,33 +2,32 @@ name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
branches: [main, develop]
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
branches: [main, develop]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
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
|
||||
run: bun run test
|
||||
|
||||
Reference in New Issue
Block a user