【发布时间】:2022-03-18 06:25:56
【问题描述】:
我正在尝试使用GitHub Actions 进行 CI 测试,到目前为止,我的测试工作流程如下:
name: test
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- name: test
run: |
npm run lint
npm test
env:
CI: true
.github/workflows/test.yml
它工作正常,但如果测试失败,我想重试一次 test 步骤(或整个工作)。
基本上,与travis-retry 相同的行为:
script:
- npm run lint
- travis_retry npm test
或使用 Gitlab CI:
test:
stage: test
retry: 1
script:
- npm run lint
- npm test
不确定是否有办法或相当简单的解决方法
【问题讨论】:
标签: continuous-integration github-actions