pyebur128/.github/workflows/run-tests.yml

53 lines
No EOL
1.5 KiB
YAML

# This is a basic workflow to help you get started with Actions
name: Run tests
on:
push:
branches:
- main
paths-ignore:
- '**/README.md'
pull_request:
branches:
- main
jobs:
build:
strategy:
matrix:
python-version: [3.8, 3.9, 3.10, 3.11, 3.12]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install libsndfile if necessary (Linux)
run: |
sudo apt install libsndfile1
if: matrix.os == 'ubuntu-latest'
- name: Install libsndfile if necessary (macOS)
run: |
brew install libsndfile
if: matrix.os == 'macos-latest'
- name: Install pyebur128
run: |
python -m pip install --upgrade pip
python -m pip install .[tests]
- name: Test with pytest
run: |
python -m pytest
- name: Upload coverage to Codecov.io
run: |
bash <(curl -s https://codecov.io/bash)
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' }}
- uses: actions/upload-artifact@v2
with:
path: coverage.xml
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' }}