Skip to content

refactor(l10n): New Crowdin translations to review and merge (#2013) #5040

refactor(l10n): New Crowdin translations to review and merge (#2013)

refactor(l10n): New Crowdin translations to review and merge (#2013) #5040

Workflow file for this run

name: test_backend
on: [push]
jobs:
test_backend:
if: ${{ ! contains(github.event.issue.labels.*.name, 'autorelease') }}
runs-on: ubuntu-latest
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres:12
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: quiz_anthropocene
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2
- name: Install Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install pip and pipenv
run: |
python -m pip install --upgrade pip
pip install --upgrade pipenv
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('Pipfile.lock') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache pipenv
uses: actions/cache@v2
with:
path: ~/.cache/pipenv
key: ${{ runner.os }}-pipenv-${{ hashFiles('Pipfile.lock') }}
restore-keys: |
${{ runner.os }}-pipenv-
- name: Cache pip-tools
uses: actions/cache@v2
with:
path: ~/.cache/pip-tools
key: ${{ runner.os }}-piptools-${{ hashFiles('**/Pipfile.lock') }}
restore-keys: |
${{ runner.os }}-piptools-
- name: Cache virtualenv
id: cache-venv
uses: actions/cache@v2
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-venv-${{ hashFiles('**/Pipfile.lock') }}
- name: Install python dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
pipenv sync --dev
- name: Run flake8 linting
run: pipenv run python -m flake8
- name: Run tests
run: pipenv run python manage.py test
env:
DEBUG: True
SECRET_KEY: github_workflow
HOST: localhost
DATABASE_URL: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/quiz_anthropocene
SESSION_COOKIE_SECURE: "False"
CSRF_COOKIE_SECURE: "False"
SECURE_HSTS_SECONDS: 0
SECURE_SSL_REDIRECT: "False"