Set all .ajax() calls content type, tweak logging #567
Workflow file for this run
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
name: Django CI | |
on: | |
push: | |
branches: [ production, stage ] | |
pull_request: | |
branches: [ production, stage ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: ["3.10"] | |
# Service containers to run with `container-job` | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgres | |
# Provide the password for postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps tcp port 5432 on service container to the host | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
sudo apt-get -y install xfonts-75dpi xfonts-base python3-psycopg2 | |
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb | |
sudo dpkg -i wkhtmltox_0.12.6-1.focal_amd64.deb | |
sudo apt-get -y -f install | |
python -m pip install --upgrade pip wheel | |
python -m pip install coveralls | |
pip install -r requirements.txt | |
- name: Run Tests | |
run: | | |
cp fm_eventmanager/settings.py.travis fm_eventmanager/settings.py | |
coverage run ./manage.py test registration | |
env: | |
SQUARE_APPLICATION_ID: ${{ secrets.SQUARE_APPLICATION_ID }} | |
SQUARE_ACCESS_TOKEN: ${{ secrets.SQUARE_ACCESS_TOKEN }} | |
SQUARE_LOCATION_ID: ${{ secrets.SQUARE_LOCATION_ID }} | |
EMAIL_HOST_USER: ${{ secrets.EMAIL_HOST_USER }} | |
EMAIL_HOST_PASSWORD: ${{ secrets.EMAIL_HOST_PASSWORD }} | |
- name: Submit coverage | |
run: coveralls --service=github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |