fix: rewrite workflows without GitHub marketplace actions
Some checks failed
CI — Test & Build / Test & Build (push) Failing after 1m13s

- Use native git clone instead of actions/checkout
- Use node:22-bookworm container directly
- Remove dependency on actions/setup-node, upload-artifact
- Use curl for Gitea API calls directly
- Fixes CI failure on self-hosted runner
This commit is contained in:
Forge
2026-03-06 13:18:27 +08:00
parent 41db281824
commit 7f16bd886f
3 changed files with 75 additions and 103 deletions

View File

@@ -7,18 +7,17 @@ on:
branches: [main]
jobs:
test:
name: Unit Tests
test-and-build:
name: Test & Build
runs-on: ubuntu-latest
container:
image: node:22-bookworm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
run: |
git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git .
git checkout ${{ gitea.sha }}
- name: Install dependencies
run: npm ci
@@ -27,31 +26,13 @@ jobs:
run: npm run typecheck
- name: Run unit tests
run: npm test
build:
name: Build Extension
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
run: npm test -- --run
- name: Build extension
run: npm run build
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: lexai-chrome-mv3-${{ github.sha }}
path: .output/chrome-mv3/
retention-days: 7
- name: Verify build output
run: |
echo "Build contents:"
ls -la .output/chrome-mv3/
echo "✅ Build successful"