test: 覆盖 release:stable 工作流接线 #57
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
| # CI for nuwa-cli: install, unit tests, and production build. | |
| # LFS checkout is required so lanproxy binaries are present for build/copy. | |
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-test: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| # Skip prepare during install so we control build timing after tests deps are ready. | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Run tests | |
| run: npm run test:run | |
| - name: Build | |
| run: npm run build |