filter component commit #534
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
paths: | |
- 'tfx_addons/**' | |
- '.github/workflows/ci.yml' | |
- 'setup.py' | |
- 'pyproject.toml' | |
- '.github/ci/deps/**' | |
branches: | |
- main | |
- r* | |
pull_request: | |
paths: | |
- 'tfx_addons/**' | |
- '.github/workflows/ci.yml' | |
- 'setup.py' | |
- 'pyproject.toml' | |
- '.github/ci/deps/**' | |
branches: | |
- main | |
- r* | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
strategy: | |
# Test for several versions of TFX in parallel | |
# keep constraints in sync with version.py | |
matrix: | |
depconstraint: | |
- .github/ci/deps/requirements_max.in | |
- .github/ci/deps/requirements_min.in | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Cache python environment | |
uses: actions/cache@v2 | |
with: | |
# Cache pip | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding setup.py + TFX version | |
key: ${{ runner.os }}-pip-${{ hashFiles(matrix.depconstraint) }}-${{ hashFiles('tfx_addons/version.py') }} | |
restore-keys: | | |
${{ runner.os }}-pip-${{ hashFiles(matrix.depconstraint) }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
python -m pip install -r ${{ matrix.depconstraint }} | |
- name: Run tests | |
run: pytest tfx_addons |