Fix soundcard import. Add Twillio TURN server. #146
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#.github/workflows/tests.yaml | |
name: Unit Tests | |
on: | |
pull_request: | |
branches: | |
- main | |
- develop | |
push: | |
branches: | |
- '**' # Every branch | |
jobs: | |
tests: | |
if: github.repository_owner == 'paulovcmedeiros' | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ "ubuntu-latest" ] | |
env: [ "pytest" ] | |
python-version: [ "3.9" ] | |
name: "${{ matrix.os }}, python=${{ matrix.python-version }}" | |
runs-on: ${{ matrix.os }} | |
container: | |
image: python:${{ matrix.python-version }}-bullseye | |
env: | |
COVERAGE_FILE: ".coverage.${{ matrix.env }}.${{ matrix.python-version }}" | |
steps: | |
#---------------------------------------------- | |
# check-out repo | |
#---------------------------------------------- | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
#---------------------------------------------- | |
# Install Audio Gear | |
#---------------------------------------------- | |
- name: Install PortAudio and PulseAudio | |
run: | | |
apt-get update | |
apt-get --assume-yes install portaudio19-dev python-all-dev pulseaudio ffmpeg | |
#---------------------------------------------- | |
# --- configure poetry & install project ---- | |
#---------------------------------------------- | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv (if cache exists) | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: ${{ github.job }}-venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml', '**/poetry.toml') }} | |
- name: Install dependencies (if venv cache is not found) | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root --only main,test | |
- name: Install the project itself | |
run: poetry install --no-interaction --only-root | |
#---------------------------------------------- | |
# run test suite and report coverage | |
#---------------------------------------------- | |
- name: Run tests | |
env: | |
SDL_VIDEODRIVER: "dummy" | |
SDL_AUDIODRIVER: "disk" | |
run: | | |
poetry run pytest | |
- name: Upload test coverage report to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./.coverage.xml |