test(router): 重构测试用例以提高可读性和可维护性 #248
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
pull_request: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
RUST_BACKTRACE: full | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.11' | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 10 | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_ENV | |
- name: Setup pnpm cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Build | |
run: ./build.sh | |
- name: Deploy | |
if: github.ref == 'refs/heads/master' | |
uses: JamesIves/[email protected] | |
with: | |
branch: docs | |
folder: dist |