make audio compression optional via API param on POST speakers/ reque… #110
This file contains hidden or 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
| name: Roundware Server CI | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| container: | |
| image: ubuntu:24.04 | |
| runs-on: ubuntu-latest | |
| strategy: | |
| max-parallel: 4 | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| services: | |
| # Label used to access the service container | |
| postgres: | |
| # Docker Hub image | |
| image: postgis/postgis | |
| ports: | |
| # will assign a random free host port | |
| - 5432:5432 | |
| # Provide the password for postgres | |
| env: | |
| POSTGRES_PASSWORD: round | |
| POSTGRES_USER: round | |
| POSTGRES_DB: roundware | |
| # Set health checks to wait until postgres has started | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Dependencies | |
| run: | | |
| apt-get update | |
| DEBIAN_FRONTEND=noninteractive xargs -a requirements.apt apt-get install -y --fix-missing | |
| python -m venv .venv | |
| .venv/bin/python -m pip install --upgrade pip setuptools | |
| .venv/bin/python -m pip install .[test] | |
| echo "PYTHONPATH=$GITHUB_WORKSPACE:$PYTHONPATH" >> $GITHUB_ENV | |
| echo PATH=${GITHUB_WORKSPACE}/.venv/bin:$PATH >> $GITHUB_ENV | |
| - name: Run Tests | |
| env: | |
| ROUNDWARE_DB_USER: round | |
| ROUNDWARE_DB_NAME: roundware | |
| ROUNDWARE_DB_PASSWORD: round | |
| ROUNDWARE_DB_HOST: postgres | |
| ROUNDWARE_DB_PORT: ${{ job.services.postgres.ports[5432] }} | |
| run: | | |
| .venv/bin/coverage run --source=roundware roundware/manage.py test --settings=roundware.settings.testing | |
| .venv/bin/coverage report -m > coverage-report.txt | |
| cat coverage-report.txt | |
| # - uses: actions/upload-artifact@v2 | |
| # with: | |
| # path: coverage-report.txt | |
| build: | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'pull_request' | |
| steps: | |
| - uses: actions/checkout@master | |
| #This Action Emits 2 Variables, IMAGE_SHA_NAME and IMAGE_URL | |
| #which you can reference in subsequent steps | |
| - name: Publish Docker Image to GPR | |
| uses: machine-learning-apps/gpr-docker-publish@master | |
| id: docker | |
| with: | |
| IMAGE_NAME: 'roundware' | |
| DOCKERFILE_PATH: './Dockerfile' | |
| BUILD_CONTEXT: '.' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |