Repository navigation
fix: 请求 20 秒无响应自动重试,仍失败按网络失败提示 (#24) #75
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: ci | |
| on: | |
| push: | |
| branches: [main] | |
| # Prose changes nothing a compiler or linter can check. | |
| paths-ignore: ["**.md", "LICENSE"] | |
| pull_request: | |
| paths-ignore: ["**.md", "LICENSE"] | |
| # A new push supersedes any run still in progress for the same ref. | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # The only gate a tag receives: a hub installs the released archive as built, | |
| # so nothing checks the source after release.yml has run. | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - run: npm ci | |
| # The hub offers a release as an update for as long as its tag differs from | |
| # the installed theme.json version, so the three files carrying the version | |
| # must agree; release.yml then holds the tag to the same value. | |
| - run: | | |
| V=$(node -p 'require("./theme.json").version') | |
| for f in package.json package-lock.json; do | |
| [ "$(node -p "require('./$f').version")" = "$V" ] || { echo "::error file=$f::version differs from theme.json $V"; exit 1; } | |
| done | |
| - run: npm run lint | |
| - run: npm test | |
| - run: npm run build |