2021-03-25 14:41:36 +00:00
|
|
|
# This is a basic workflow to help you get started with Actions
|
|
|
|
|
|
|
|
name: Run tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-03-25 20:42:04 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths-ignore:
|
|
|
|
- '**/README.md'
|
2021-03-25 14:41:36 +00:00
|
|
|
pull_request:
|
2021-03-25 20:42:04 +00:00
|
|
|
branches:
|
|
|
|
- main
|
2021-03-25 14:41:36 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-09-03 18:56:29 +00:00
|
|
|
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
2021-03-25 14:41:36 +00:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-09-03 19:19:03 +00:00
|
|
|
uses: actions/checkout@v4
|
2021-03-25 14:41:36 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2024-09-03 19:19:03 +00:00
|
|
|
uses: actions/setup-python@v5
|
2021-03-25 14:41:36 +00:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2021-03-25 15:11:29 +00:00
|
|
|
- name: Install libsndfile if necessary (Linux)
|
2021-03-25 14:50:40 +00:00
|
|
|
run: |
|
2021-03-25 15:14:24 +00:00
|
|
|
sudo apt install libsndfile1
|
2021-03-25 15:11:29 +00:00
|
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
- name: Install libsndfile if necessary (macOS)
|
|
|
|
run: |
|
2021-03-25 15:16:30 +00:00
|
|
|
brew install libsndfile
|
2021-03-25 15:11:29 +00:00
|
|
|
if: matrix.os == 'macos-latest'
|
2021-03-25 14:41:36 +00:00
|
|
|
- name: Install pyebur128
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
python -m pip install .[tests]
|
|
|
|
- name: Test with pytest
|
|
|
|
run: |
|
|
|
|
python -m pytest
|
2021-03-25 16:14:11 +00:00
|
|
|
- name: Upload coverage to Codecov.io
|
|
|
|
run: |
|
|
|
|
bash <(curl -s https://codecov.io/bash)
|
2024-09-03 18:57:52 +00:00
|
|
|
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' }}
|
2024-09-03 19:19:03 +00:00
|
|
|
- uses: actions/upload-artifact@v4
|
2021-03-25 16:14:11 +00:00
|
|
|
with:
|
|
|
|
path: coverage.xml
|
2024-09-03 18:57:52 +00:00
|
|
|
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' }}
|