Skip to content

Commit

Permalink
Introduce repository variables to control ODT execution.
Browse files Browse the repository at this point in the history
  • Loading branch information
isarkis committed Apr 21, 2023
1 parent 861344d commit 800add1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,14 @@ jobs:
# Runs on-host integration and unit tests.
on-device-test:
needs: [initialize, build]
if: | # Always run if not a PR or if the PR has on_device label
fromJSON(needs.initialize.outputs.on_device_test).enabled == true && (
github.event_name != 'pull_request' ||
# Run if PR has on_device label, and on postsubmit and nightlies if
# repositories variables permit.
if: |
fromJSON(needs.initialize.outputs.on_device_test).enabled == true && ((
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'on_device')
)
) || ( ${{ inputs.nightly == 'true' && vars.RUN_ODT_TESTS_ON_NIGHTLY != 'False' ) }} ||
${{ ( github.event_name == 'push' && env.RUN_ODT_TESTS_ON_POSTSUBMIT != 'False' ) }} )
runs-on: [self-hosted, linux, X64]
name: ${{ matrix.name }}_on_device_${{ matrix.shard }}
container: ${{ needs.docker-unittest-image.outputs.docker_unittest_tag }}
Expand Down

0 comments on commit 800add1

Please sign in to comment.