Skip to content

fix(agent-rust): enable rustls-tls-webpki-roots feature for tokio-tun… #92

fix(agent-rust): enable rustls-tls-webpki-roots feature for tokio-tun…

fix(agent-rust): enable rustls-tls-webpki-roots feature for tokio-tun… #92

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Disable pnpm enforcement
run: |
# 提前安装该包并强行删除其限制脚本,或者通过环境变量绕过
# 发现更好的办法是设置环境变量 npm_config_user_agent
echo "npm_config_user_agent=pnpm/9.0.0 npm/? node/?" >> $GITHUB_ENV
- name: Install dependencies
run: npm install --legacy-peer-deps
- name: Run ESLint
run: npm run lint
continue-on-error: true # 暂时允许 lint 失败
- name: Run Tests
run: npm run test
- name: Build
run: npm run build
env:
VITE_USE_CDN: false
- name: Check build output
run: |
ls -la dist/
test -f dist/index.html
docker:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image (test)
uses: docker/build-push-action@v5
with:
context: .
push: false
platforms: linux/amd64,linux/arm64
tags: api-monitor:test
cache-from: type=gha
cache-to: type=gha,mode=max