Pytorch2 #289
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Test pull request | |
on: | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Load cached venv | |
id: cached-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} | |
- name: Install system library | |
run: | | |
sudo apt-get update | |
sudo apt-get install libsndfile1 | |
- name: Install library | |
if: steps.cached-dependencies.outputs.cache-hit != 'true' | |
run: | | |
pip install .[docs,test] | |
- name: Test with pytest | |
run: | | |
HYPOTHESIS_PROFILE="ci" RUN_SLOW=1 pytest -sv --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
env_vars: PYTHON | |
name: codecov-thunder | |
fail_ci_if_error: true |