ci: run cli version with specific runtime version #34924
Workflow file for this run
This file contains 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: Unit Test | |
on: | |
pull_request: | |
branches: | |
- main | |
- dev | |
- hotfix/**/* | |
- release/** | |
push: | |
branches: | |
- main | |
- dev | |
- hotfix/**/* | |
- release/** | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout-pr | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.head_ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- name: Checkout | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.ref_name }} | |
repository: ${{ github.repository }} | |
- name: Merge Branches | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "bot" | |
git remote add ${{ github.event.pull_request.base.repo.owner.login }} ${{ github.event.pull_request.base.repo.clone_url }} | |
git fetch ${{ github.event.pull_request.base.repo.owner.login }} | |
git merge ${{ github.event.pull_request.base.repo.owner.login }}/${{ github.event.pull_request.base.ref }} | |
- name: setup project | |
uses: ./.github/actions/setup-project | |
- name: Unit Test | |
run: | | |
xvfb-run -a pnpm run -r --stream test:unit | |
- name: CodeCov report attempt 1 | |
id: codecov1 | |
continue-on-error: true | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true | |
- name: delay 10s for attempt 2 | |
if: steps.codecov1.outcome == 'failure' | |
run: | | |
sleep 10s | |
- name: CodeCov report attempt 2 | |
id: codecov2 | |
if: steps.codecov1.outcome == 'failure' | |
continue-on-error: true | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true | |
- name: delay 10s for attempt 3 | |
if: steps.codecov2.outcome == 'failure' | |
run: | | |
sleep 10s | |
- name: CodeCov report attempt 3 | |
id: codecov3 | |
if: steps.codecov2.outcome == 'failure' | |
continue-on-error: true | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true | |
- name: delay 10s for attempt 4 | |
if: steps.codecov3.outcome == 'failure' | |
run: | | |
sleep 10s | |
- name: CodeCov report attempt 4 | |
id: codecov4 | |
if: steps.codecov3.outcome == 'failure' | |
continue-on-error: true | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true | |
- name: delay 10s for attempt 5 | |
if: steps.codecov4.outcome == 'failure' | |
run: | | |
sleep 10s | |
- name: CodeCov report attempt 5 | |
id: codecov5 | |
if: steps.codecov4.outcome == 'failure' | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true |