Skip to content

Add TF 2.16 to CI test matrix #1350

Add TF 2.16 to CI test matrix

Add TF 2.16 to CI test matrix #1350

Workflow file for this run

name: Unittest
on:
push:
branches:
- main
pull_request: {}
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
tf-version: [1.14.0, 1.15.5, 2.0.4, 2.1.4, 2.2.3, 2.3.4, 2.4.4, 2.5.3, 2.6.5, 2.7.4, 2.8.4, 2.9.3, 2.10.1, 2.11.0]
python-version: [3.7]
include:
- tf-version: 2.4.4
python-version: 3.8
- tf-version: 2.5.3
python-version: 3.9
- tf-version: 2.6.5
python-version: 3.9
- tf-version: 2.7.4
python-version: 3.9
- tf-version: 2.8.4
python-version: "3.10"
- tf-version: 2.9.3
python-version: "3.10"
- tf-version: 2.10.1
python-version: "3.10"
- tf-version: 2.11.1
python-version: "3.10"
- tf-version: 2.12.0
python-version: "3.8"
- tf-version: 2.12.0
python-version: "3.11"
- tf-version: 2.13.0
python-version: "3.8"
- tf-version: 2.13.0
python-version: "3.11"
- tf-version: 2.14.0
python-version: "3.11"
- tf-version: 2.15.0
python-version: "3.11"
- tf-version: 2.16.1
python-version: "3.11"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install 'protobuf < 3.20'
pip install tensorflow-cpu==${{matrix.tf-version}} || pip install tensorflow==${{matrix.tf-version}}
pip install -e .[test]
- name: Install legacy tf-keras
if: matrix.tf-version == '2.16.1'
run: pip install tf-keras==${{matrix.tf-version}}
- name: Test with pytest
run: |
if [[ "${{ matrix.tf-version }}" == "2.16.1" ]]; then
export TF_USE_LEGACY_KERAS=1
fi
pytest . -n auto --cov=larq --cov-report=xml --cov-config=.coveragerc
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash) -f ./coverage.xml -F unittests