⬆️ Bump pytest-cov from 4.1.0 to 5.0.0 #1035
Workflow file for this run
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: Unittest | |
on: | |
push: | |
branches: | |
- main | |
pull_request: {} | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
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 2.12 testing is disabled for now because it requires protobuf>=3.20, while the other | |
# versions of TF require protobuf<3.20, and tensorflow-datasets is broken in such a way | |
# that it always installs the latest but it also has similar requirements. | |
# - tf-version: 2.12.0 | |
# python-version: "3.10" | |
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 tensorflow-cpu==${{matrix.tf-version}} || pip install tensorflow==${{matrix.tf-version}} | |
pip install -e .[test] | |
- name: Test data and models with pytest | |
run: pytest . -n auto --ignore=tests/train_test.py --cov=larq_zoo --cov-report=xml --cov-config=.coveragerc | |
- name: Upload coverage to Codecov | |
run: bash <(curl -s https://codecov.io/bash) -f ./coverage.xml -F unittests | |
train-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
pip install tensorflow-cpu==2.10.1 # Tests currently don't run with a newer tensorflow | |
pip install -e .[test] | |
- name: Test training with pytest | |
run: pytest tests/train_test.py -n auto --cov=larq_zoo --cov-report=xml --cov-config=.coveragerc --cov-append | |
- name: Upload coverage to Codecov | |
run: bash <(curl -s https://codecov.io/bash) -f ./coverage.xml -F unittests |