Exclude gh-actions for Python 3.7 on Ubuntu 24.04 and MacOS 14 #138
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: tests | |
on: | |
- push | |
- pull_request | |
jobs: | |
test-with-tox: | |
name: Test with tox | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
matrix: | |
# https://help.github.com/articles/virtual-environments-for-github-actions | |
platform: | |
- ubuntu-20.04 | |
- ubuntu-22.04 # ubuntu-latest | |
- ubuntu-24.04 | |
- macos-12 | |
- macos-13 | |
- macos-14 # macos-latest | |
- windows-2019 | |
- windows-2022 # windows-latest | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | |
exclude: | |
- platform: [ubuntu-24.04, macos-14] | |
python-version: 3.7 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: install libsndfile for linux | |
if: matrix.platform == 'ubuntu-18.04' || matrix.platform == 'ubuntu-20.04' || matrix.platform == 'ubuntu-22.04' | |
run: sudo apt-get install -y libsndfile1 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox tox-gh-actions | |
- name: Test with tox | |
run: tox | |
- name: Remove tox cache | |
run: rm -r .tox | |
- name: Prepare code coverage data | |
if: matrix.platform == 'ubuntu-22.04' && matrix.python-version == 3.9 | |
run: | | |
pip install pandas tensorflow torch tensorboardX pillow matplotlib soundfile pytest pytest-cov | |
# For NumPy 2.0 compatibility, see: https://github.com/tensorflow/tensorboard/issues/6869 | |
pip install tb-nightly | |
pytest --doctest-glob="*.rst" --cov=./ --cov-report xml --ignore="tests/test_summary_reader/test_no_tensorflow.py" | |
- name: Test documentation | |
if: matrix.platform == 'ubuntu-22.04' && matrix.python-version == 3.9 | |
run: | | |
sudo apt-get install -y pandoc | |
pip install -r requirements.txt | |
# For NumPy 2.0 compatibility, see: https://github.com/tensorflow/tensorboard/issues/6869 | |
pip install tb-nightly | |
sphinx-build -b html docs docs/_build/html | |
sphinx-build -b doctest docs docs/_build/doctest | |
- name: Upload coverage to Codecov | |
if: matrix.platform == 'ubuntu-22.04' && matrix.python-version == 3.9 | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} |