|
1 | | -name: CI_TF1 |
| 1 | +name: CI_TF2 |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | | - path: |
6 | | - - 'deepctr/*' |
7 | | - - 'tests/*' |
| 5 | + paths: |
| 6 | + - 'deepctr/**' |
| 7 | + - 'tests/**' |
| 8 | + - 'setup.py' |
| 9 | + - 'setup.cfg' |
| 10 | + - '.github/workflows/**' |
8 | 11 | pull_request: |
9 | | - path: |
10 | | - - 'deepctr/*' |
11 | | - - 'tests/*' |
| 12 | + paths: |
| 13 | + - 'deepctr/**' |
| 14 | + - 'tests/**' |
| 15 | + - 'setup.py' |
| 16 | + - 'setup.cfg' |
| 17 | + - '.github/workflows/**' |
| 18 | + workflow_dispatch: |
12 | 19 |
|
13 | 20 | jobs: |
14 | 21 | build: |
15 | | - |
16 | | - runs-on: ubuntu-latest |
17 | | - timeout-minutes: 360 |
| 22 | + runs-on: ubuntu-22.04 |
| 23 | + timeout-minutes: 180 |
18 | 24 | strategy: |
| 25 | + fail-fast: false |
19 | 26 | matrix: |
20 | | - python-version: [ 3.6,3.7 ] |
21 | | - tf-version: [ 1.15.0 ] |
| 27 | + include: |
| 28 | + - python-version: "3.10" |
| 29 | + tf-version: "2.10.0" |
| 30 | + use-legacy-keras: "0" |
| 31 | + - python-version: "3.10" |
| 32 | + tf-version: "2.15.0" |
| 33 | + use-legacy-keras: "0" |
| 34 | + - python-version: "3.11" |
| 35 | + tf-version: "2.15.0" |
| 36 | + use-legacy-keras: "0" |
| 37 | + - python-version: "3.10" |
| 38 | + tf-version: "2.20.0" |
| 39 | + use-legacy-keras: "1" |
| 40 | + - python-version: "3.11" |
| 41 | + tf-version: "2.20.0" |
| 42 | + use-legacy-keras: "1" |
| 43 | + - python-version: "3.12" |
| 44 | + tf-version: "2.20.0" |
| 45 | + use-legacy-keras: "1" |
| 46 | + env: |
| 47 | + TF_USE_LEGACY_KERAS: ${{ matrix.use-legacy-keras }} |
22 | 48 |
|
23 | | - exclude: |
24 | | - - python-version: 3.7 |
25 | | - tf-version: 1.4.0 |
26 | | - - python-version: 3.7 |
27 | | - tf-version: 1.12.0 |
28 | | - - python-version: 3.7 |
29 | | - tf-version: 1.15.0 |
30 | | - - python-version: 3.8 |
31 | | - tf-version: 1.4.0 |
32 | | - - python-version: 3.8 |
33 | | - tf-version: 1.14.0 |
34 | | - - python-version: 3.8 |
35 | | - tf-version: 1.15.0 |
36 | | - - python-version: 3.6 |
37 | | - tf-version: 2.7.0 |
38 | | - - python-version: 3.6 |
39 | | - tf-version: 2.8.0 |
40 | | - - python-version: 3.6 |
41 | | - tf-version: 2.9.0 |
42 | | - - python-version: 3.6 |
43 | | - tf-version: 2.10.0 |
44 | | - - python-version: 3.9 |
45 | | - tf-version: 1.4.0 |
46 | | - - python-version: 3.9 |
47 | | - tf-version: 1.15.0 |
48 | | - - python-version: 3.9 |
49 | | - tf-version: 2.2.0 |
50 | | - - python-version: 3.9 |
51 | | - tf-version: 2.5.0 |
52 | | - - python-version: 3.9 |
53 | | - tf-version: 2.6.0 |
54 | | - - python-version: 3.9 |
55 | | - tf-version: 2.7.0 |
56 | | - - python-version: 3.10.7 |
57 | | - tf-version: 1.4.0 |
58 | | - - python-version: 3.10.7 |
59 | | - tf-version: 1.15.0 |
60 | | - - python-version: 3.10.7 |
61 | | - tf-version: 2.2.0 |
62 | | - - python-version: 3.10.7 |
63 | | - tf-version: 2.5.0 |
64 | | - - python-version: 3.10.7 |
65 | | - tf-version: 2.6.0 |
66 | | - - python-version: 3.10.7 |
67 | | - tf-version: 2.7.0 |
68 | 49 | steps: |
69 | | - |
70 | | - - uses: actions/checkout@v3 |
| 50 | + - uses: actions/checkout@v5 |
71 | 51 |
|
72 | 52 | - name: Setup python environment |
73 | | - uses: actions/setup-python@v4 |
| 53 | + uses: actions/setup-python@v6 |
74 | 54 | with: |
75 | 55 | python-version: ${{ matrix.python-version }} |
76 | 56 |
|
77 | 57 | - name: Install dependencies |
78 | 58 | run: | |
79 | | - pip3 install -q tensorflow==${{ matrix.tf-version }} |
80 | | - pip install -q protobuf==3.19.0 |
81 | | - pip install -q requests |
82 | | - pip install -e . |
| 59 | + python -m pip install -q --upgrade pip setuptools wheel |
| 60 | + python -m pip install -q "numpy<2" |
| 61 | + python -m pip install -q tensorflow==${{ matrix.tf-version }} |
| 62 | + if [ "${{ matrix.use-legacy-keras }}" = "1" ]; then |
| 63 | + python -m pip install -q tf-keras==${{ matrix.tf-version }} |
| 64 | + fi |
| 65 | + python -m pip install -q pytest pytest-cov |
| 66 | + python -m pip install -e . |
| 67 | + python -m pip check |
| 68 | +
|
83 | 69 | - name: Test with pytest |
84 | | - timeout-minutes: 360 |
| 70 | + timeout-minutes: 180 |
85 | 71 | run: | |
86 | | - pip install -q pytest |
87 | | - pip install -q pytest-cov |
88 | | - pip install -q python-coveralls |
89 | | - pytest --cov=deepctr --cov-report=xml |
| 72 | + pytest --cov=deepctr --cov-report=xml --cov-report=term-missing:skip-covered |
| 73 | +
|
90 | 74 | - name: Upload coverage to Codecov |
91 | | - uses: codecov/codecov-action@v3.1.0 |
| 75 | + uses: codecov/codecov-action@v6 |
92 | 76 | with: |
93 | | - token: ${{secrets.CODECOV_TOKEN}} |
94 | | - file: ./coverage.xml |
| 77 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 78 | + files: ./coverage.xml |
95 | 79 | flags: pytest |
96 | 80 | name: py${{ matrix.python-version }}-tf${{ matrix.tf-version }} |
0 commit comments