Skip to content

Commit

Permalink
Testing vars
Browse files Browse the repository at this point in the history
  • Loading branch information
isarkis committed Apr 24, 2023
1 parent 861344d commit 8d4b2cf
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/config/android-arm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"docker_service": "build-android",
"on_device_test": {
"enabled": true,
"enabled": false,
"tests": [
"0",
"1",
Expand Down
2 changes: 1 addition & 1 deletion .github/config/android-arm64.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"docker_service": "build-android",
"on_device_test": {
"enabled": true,
"enabled": false,
"tests": [
"0",
"1",
Expand Down
2 changes: 1 addition & 1 deletion .github/config/android-x86.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"docker_service": "build-android",
"on_device_test": {
"enabled": true,
"enabled": false,
"tests": [
"0",
"1",
Expand Down
1 change: 0 additions & 1 deletion .github/config/evergreen-arm-hardfp.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"on_device_test": {
"enabled": true,
"tests": [
"evergreen_test",
"unit_test"
]
},
Expand Down
2 changes: 1 addition & 1 deletion .github/config/raspi-2.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"docker_service": "build-raspi",
"on_device_test": {
"enabled": true,
"enabled": false,
"tests": [
"0",
"1",
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/evergreen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,22 @@ on:
type: boolean
default: false

env:
RUN_ODT_TESTS_ON_NIGHTLY: ${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}
RUN_ODT_TESTS_ON_POSTSUBMIT: ${{ vars.RUN_ODT_TESTS_ON_POSTSUBMIT }}

jobs:
varshow:
runs-on: ubuntu-latest
steps:
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
echo "${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}"
echo "${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}"
echo "${{ env.RUN_ODT_TESTS_ON_POSTSUBMIT }}"
echo "${{ env.RUN_ODT_TESTS_ON_POSTSUBMIT }}"
evergreen-x64:
uses: ./.github/workflows/main.yaml
permissions:
Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ jobs:
)
)
steps:
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
echo "${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}"
echo "${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}"
- id: checkout
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -179,6 +185,12 @@ jobs:
# filesystem, whereas /__w which contains Cobalt source code is on tmpfs.
TMPDIR: /__w/_temp
steps:
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
echo "${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}"
echo "${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}"
- name: Checkout
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -231,10 +243,11 @@ jobs:
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' ||
contains(github.event.pull_request.labels.*.name, 'on_device')
)
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' && vars.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 All @@ -249,6 +262,12 @@ jobs:
env:
COBALT_BOOTLOADER: ${{needs.initialize.outputs.bootloader}}
steps:
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
echo "${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}"
echo "${{ vars.RUN_ODT_TESTS_ON_NIGHTLY }}"
- name: Checkout
uses: actions/checkout@v3
- name: Run Tests (${{ matrix.shard }})
Expand Down

0 comments on commit 8d4b2cf

Please sign in to comment.