From 6c67533a0ef6fa447176e3e9c1656df701469b42 Mon Sep 17 00:00:00 2001 From: Gerard Casas Saez Date: Mon, 17 Apr 2023 17:38:21 -0600 Subject: [PATCH] Update CI to skip matrix if no job needed (#236) * Update CI to skip matrix if no job needed * fix up ci.yml * use ubuntu-latest for all workflows --- .github/workflows/ci.yml | 3 ++- .github/workflows/ci_examples.yml | 3 ++- .github/workflows/release.yml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51c0bebe..db85f130 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,12 +49,13 @@ jobs: - name: Filter projects id: set-matrix run: | - echo "::set-output name=projects::$(python ./.github/workflows/filter_projects.py $HOME/files.json)" + echo "projects=$(python ./.github/workflows/filter_projects.py $HOME/files.json)" >> $GITHUB_OUTPUT ci: runs-on: ubuntu-latest needs: filter_projects timeout-minutes: 60 + if: needs.filter_examples.outputs.projects != '[]' strategy: # Test for each project in parallel using ci_max and ci_min to ensure # tested in range of tfx/tensorflow supported versions diff --git a/.github/workflows/ci_examples.yml b/.github/workflows/ci_examples.yml index 9f5b540d..6e149bbb 100644 --- a/.github/workflows/ci_examples.yml +++ b/.github/workflows/ci_examples.yml @@ -49,11 +49,12 @@ jobs: - name: Filter example projects id: set-matrix run: | - echo "::set-output name=projects::$(python ./.github/workflows/filter_examples.py $HOME/files.json)" + echo "projects=$(python ./.github/workflows/filter_examples.py $HOME/files.json)" >> $GITHUB_OUTPUT ci-examples: runs-on: ubuntu-latest needs: filter_examples timeout-minutes: 60 + if: needs.filter_examples.outputs.projects != '[]' strategy: # Test for each project in parallel using ci_max and ci_min to ensure # tested in range of tfx/tensorflow supported versions diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3bdb975a..a711fc36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ on: jobs: build-and-publish: name: Build TFX Addons PyPI package and release to PyPI and TestPyPI - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python 3.7