Skip to content

Commit b9b534a

Browse files
fineguyThe TensorFlow Datasets Authors
authored and
The TensorFlow Datasets Authors
committed
Draft optional tests workflow.
PiperOrigin-RevId: 665815946
1 parent 16a566f commit b9b534a

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.github/workflows/pytest-optional.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Unittests [Optional]
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_run:
6+
workflows: [Unittests]
7+
types: [requested]
8+
9+
# Cancel in-progress runs for the current workflow if not on the main branch
10+
# (as it marks the unittests as failed).
11+
# Conditionals to concurrent are based on the solution proposed in this link:
12+
# https://github.community/t/concurrency-cancel-in-progress-but-not-when-ref-is-master/194707
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
15+
# Cancel only PR intermediate builds.
16+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

.github/workflows/pytest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ on:
2121
- cron: '0 2 * * *'
2222

2323
# Cancel in-progress runs for the current workflow if not on the main branch
24-
# (as it mark the unittests as failed).
24+
# (as it marks the unittests as failed).
2525
# Conditionals to concurrent are based on the solution proposed in this link:
2626
# https://github.community/t/concurrency-cancel-in-progress-but-not-when-ref-is-master/194707
2727
concurrency:
2828
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
29-
# Cancel only PR intermediate builds
29+
# Cancel only PR intermediate builds.
3030
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
3131

3232
env:
@@ -79,7 +79,7 @@ jobs:
7979
# Do not cancel in-progress jobs if any matrix job fails.
8080
fail-fast: false
8181
matrix:
82-
tf-version: ['tensorflow']
82+
tf-version: [tensorflow]
8383
# Can't reference env variables in matrix
8484
num-shards: ${{ fromJson(needs.shards-job.outputs.num-shards) }}
8585
shard-id: ${{ fromJson(needs.shards-job.outputs.shard-ids) }}

0 commit comments

Comments
 (0)