forked from tensorflow/tflite-micro
-
Notifications
You must be signed in to change notification settings - Fork 16
65 lines (59 loc) · 2.21 KB
/
tests_post.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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