blob: 719adaaab708773791c1544be86cf1d95d28955e [file] [log] [blame]
name: Post Tests
# This is for tests that run on a PR post merge. This to optimize CI test suite time
# for exceptionally long running test processes. Errors will still generate an
# issue against the PR/commit so will be caught.
# These tests also run on the ci:run_full label.
on:
pull_request_target:
types:
- closed
- labeled
jobs:
riscv_postmerge:
if: ${{ github.event.pull_request.merged == true ||
contains(github.event.pull_request.labels.*.name, 'ci:run_full') }}
uses: ./.github/workflows/riscv_postmerge.yml
with:
trigger-sha: ${{ github.event.pull_request.head.sha }}
secrets:
tflm-bot-token: ${{ secrets.TFLM_BOT_PACKAGE_READ_TOKEN }}
xtensa_postmerge:
if: ${{ github.event.pull_request.merged == true ||
contains(github.event.pull_request.labels.*.name, 'ci:run_full') }}
uses: ./.github/workflows/xtensa_postmerge.yml
with:
trigger-sha: ${{ github.event.pull_request.head.sha }}
secrets:
tflm-bot-token: ${{ secrets.TFLM_BOT_PACKAGE_READ_TOKEN }}
issue_on_error:
needs: [riscv_postmerge,xtensa_postmerge]
if: ${{ always() && contains(needs.*.result, 'failure') &&
!contains(github.event.pull_request.labels.*.name, 'ci:run_full') }}
uses: ./.github/workflows/issue_on_error.yml
with:
repo: ${{ github.repository}}
workflow: ${{ github.workflow }}
run_number: ${{ github.run_number }}
run_id: ${{ github.run_id }}
flag_label: ci:bot_issue
pr_number: ${{ github.event.number }}
pr_link: ${{ github.event.pull_request._links.html.href }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
ci_run_full:
needs: [issue_on_error]
runs-on: ubuntu-latest
steps:
- name: remove-cirun-full
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci:run_full') }}
uses: actions/github-script@v5
with:
github-token: ${{ secrets.TFLM_BOT_REPO_TOKEN }}
script: |
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: 'ci:run_full'
})
continue-on-error: true