view .github/workflows/ci.yml @ 427:e98507ccf4ed

Use Github Actions for CI
author Amine Sehili <amine.sehili@gmail.com>
date Tue, 29 Oct 2024 18:52:13 +0100
parents c5b4178aa80f
children dde9d076e6ee
line wrap: on
line source
name: CI

on:
  push:
    branches: [master, dev]
  pull_request:
    branches: [master]

jobs:
  test:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

    steps:
    - name: Checkout code
      uses: actions/checkout@v3

    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python-version }}

    - name: Set up PYTHONPATH
      run: echo "PYTHONPATH=$PYTHONPATH:${{ github.workspace }}" >> $GITHUB_ENV

    - name: Install dependencies
      run: |
        sudo apt-get update --fix-missing
        pip install numpy pytest pydub matplotlib

    - name: Install specific package for Python 3.13 only
      if: matrix.python-version == '3.13'
      run: pip install audioop-lts

    - name: Run tests
      run: pytest -s -p no:warnings "tests"