From 6336979ee4ee460f508589770facf5b0c285abc1 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Wed, 16 Feb 2022 03:59:31 -0800 Subject: [PATCH] Add Python testing workflow. --- .github/workflows/python-package.yml | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/python-package.yml diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..edc399a --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,45 @@ +name: Python Package + +on: [push, pull_request] + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04, windows-2019, macos-10.15] + python-version: + - "3.6" + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "pypy-3.7" + - "pypy-3.8" + architecture: ["x86", "x64"] + exclude: + - os: macos-10.15 # Can't compile Numpy for this implementation. + python-version: "pypy-3.7" + - os: macos-10.15 + architecture: "x86" + - os: ubuntu-20.04 + architecture: "x86" + + steps: + - name: Install APT dependencies + if: runner.os == 'Linux' + run: sudo apt-get install libsndfile1 + - uses: actions/checkout@v2 + with: + submodules: true + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + architecture: ${{ matrix.architecture }} + - name: Install requirements + run: pip install numpy pytest + - name: Install editable package + run: pip install --editable . --verbose + - name: Run tests + run: python -m pytest