forked from tensorflow/tfx-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.36 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: TFX Addons package CI
on:
push:
paths:
- 'tfx_addons/**'
- '.github/workflows/ci.yml'
- 'setup.py'
- 'pyproject.toml'
branches:
- main
- r*
pull_request:
paths:
- 'tfx_addons/**'
- '.github/workflows/ci.yml'
- 'setup.py'
- 'pyproject.toml'
branches:
- main
- r*
jobs:
ci:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
# Test for several versions of TFX in parallel
matrix:
depconstraint: ["tfx~=1.0.0 tensorflow~=2.5.0", "tfx~=1.2.0 tensorflow~=2.5.0"]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding setup.py + TFX version
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}-${{ matrix.depconstraint }}
restore-keys: |
${{ runner.os }}-pip--${{ hashFiles('setup.py') }}
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -e ".[all, test]" ${{ matrix.depconstraint }}
- name: Run tests
run: pytest tfx_addons