Remove nginx.site.conf file #2870
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: CI | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| env: | |
| python-version: '3.12.x' | |
| node-version: '20' | |
| mailroom-version: '10.2.0' | |
| services: | |
| valkey: | |
| image: valkey/valkey:8.0-alpine | |
| ports: | |
| - 6379:6379 | |
| postgres: | |
| image: postgres:15-alpine | |
| env: | |
| POSTGRES_DB: temba | |
| POSTGRES_USER: temba | |
| POSTGRES_PASSWORD: temba | |
| ports: | |
| - 5432:5432 | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Linux packages | |
| run: | | |
| sudo apt update | |
| sudo apt install -y --no-install-recommends libgdal-dev ffmpeg | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.python-version }} | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: 1.8.5 | |
| virtualenvs-in-project: true | |
| - name: Install Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.node-version }} | |
| - name: Install and start DynamoDB | |
| uses: rrainn/dynamodb-action@v4.0.0 | |
| with: | |
| port: 6000 | |
| - name: Run MinIO docker container | |
| run: | | |
| docker run -d --rm \ | |
| -p 9000:9000 \ | |
| -p 9001:9001 \ | |
| --env MINIO_ROOT_USER=root \ | |
| --env MINIO_ROOT_PASSWORD=tembatemba \ | |
| --health-cmd "curl -f http://127.0.0.1:9000/minio/health/live" \ | |
| --health-interval 10s \ | |
| --health-timeout 5s \ | |
| --health-retries 5 \ | |
| minio/minio:latest minio server /data --console-address ":9001" | |
| - name: Initialize environment | |
| env: | |
| POSTGIS: 'off' | |
| run: | | |
| poetry install --no-root | |
| yarn install | |
| sudo yarn global add less | |
| ln -s ${{ github.workspace }}/temba/settings.py.dev ${{ github.workspace }}/temba/settings.py | |
| poetry run python manage.py migrate | |
| poetry run python manage.py migrate_dynamo --testing | |
| # fetch, extract and start mailroom | |
| wget https://github.com/nyaruka/mailroom/releases/download/v${{ env.mailroom-version }}/mailroom_${{ env.mailroom-version }}_linux_amd64.tar.gz | |
| tar -xvf mailroom_${{ env.mailroom-version }}_linux_amd64.tar.gz mailroom | |
| # start mailroom but use different valkey db so that it doesn't actually handle tasks | |
| ./mailroom -db=postgres://temba:temba@localhost:5432/temba?sslmode=disable -valkey=valkey://localhost:6379/15 -log-level=info > mailroom.log & | |
| - name: Run pre-test checks | |
| run: | | |
| # test that everything is well formatted, no missing migrations etc | |
| poetry run python code_check.py --debug | |
| # check we can collect and compress all static files | |
| poetry run python manage.py collectstatic --noinput --verbosity=0 | |
| poetry run python manage.py compress --extension=".html" --settings=temba.settings_compress | |
| - name: Run tests | |
| env: | |
| POSTGIS: 'off' | |
| run: | | |
| poetry run coverage run manage.py test --keepdb --noinput --verbosity=2 | |
| poetry run coverage report -i | |
| poetry run coverage xml | |
| poetry run coverage html | |
| - name: Save coverage report as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: htmlcov/ | |
| - name: Mailroom log | |
| if: failure() | |
| run: cat mailroom.log |