2023-03-26 16:00:51 -06:00
|
|
|
name: python test
|
2022-12-26 18:57:00 -07:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
pull_request:
|
|
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
|
|
|
|
|
|
jobs:
|
2023-03-26 15:30:39 -06:00
|
|
|
run:
|
2022-12-26 18:57:00 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
python-version: ["3.9", "3.10"]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
2022-12-29 12:21:28 -07:00
|
|
|
- name: Install system packages
|
2022-12-26 19:17:21 -07:00
|
|
|
run: |
|
2023-01-14 12:31:33 -07:00
|
|
|
sudo apt-get update
|
2022-12-29 12:32:00 -07:00
|
|
|
sudo apt-get install -y ffmpeg libsndfile1
|
2022-12-26 19:17:21 -07:00
|
|
|
|
2023-03-26 15:30:39 -06:00
|
|
|
- name: Upgrade pip
|
2022-12-26 18:57:00 -07:00
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
|
2023-03-26 15:30:39 -06:00
|
|
|
- name: Install pip packages
|
2022-12-26 18:57:00 -07:00
|
|
|
run: |
|
2023-03-26 15:30:39 -06:00
|
|
|
pip install -r requirements_all.txt
|
2022-12-26 18:57:00 -07:00
|
|
|
|
|
|
|
- name: Test with unittest
|
|
|
|
run: |
|
|
|
|
RIFFUSION_TEST_DEVICE=cpu python -m unittest test/*_test.py
|