You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
01/.github/workflows/test.yml

62 lines
1.4 KiB

name: Run Test
on:
10 months ago
pull_request:
branches: [main]
# push: # Trigger the workflow on push events
concurrency:
group: "test"
cancel-in-progress: false
jobs:
pytest:
name: Run Test
10 months ago
strategy:
10 months ago
fail-fast: false
matrix:
10 months ago
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.11"]
10 months ago
10 months ago
defaults:
run:
working-directory: 01OS
10 months ago
10 months ago
runs-on: ${{ matrix.os }}
10 months ago
steps:
- name: Checkout
uses: actions/checkout@v4
10 months ago
- name: Install poetry
run: pipx install poetry
10 months ago
10 months ago
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
10 months ago
python-version: ${{ matrix.python-version }}
10 months ago
cache: "poetry"
10 months ago
10 months ago
# Install Portaudio on Ubuntu
10 months ago
- name: Installing Portaudio in Ubuntu
10 months ago
if: matrix.os == 'ubuntu-latest'
10 months ago
run: sudo apt-get install portaudio19-dev python-all-dev
10 months ago
# Install Portaudio on macOS using Homebrew
10 months ago
- name: Installing Portaudio in Mac
10 months ago
if: matrix.os == 'macos-latest'
10 months ago
run: brew install portaudio
10 months ago
# Install Poetry and project dependencies
- name: Install Poetry Package
run: |
pip install --upgrade pip
pip install poetry==1.3.2
poetry config virtualenvs.create false
poetry install --no-interaction --with dev
10 months ago
10 months ago
# Run pytest
10 months ago
- name: Run Pytest
run: poetry run pytest tests