Skip to content

Bump actions/checkout from 3 to 4 #47

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #47

Workflow file for this run

name: Run Django Tests
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
test:
name: Run Django Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12.3-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--mount type=tmpfs,destination=/var/lib/postgresql/data
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
# https://endoflife.date/python
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v4
- name: local-fix
run: |
# Hack to get setup-python to work on act
# (see https://github.com/nektos/act/issues/251)
if [ ! -f "/etc/lsb-release" ] ; then
echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release
fi
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ hashFiles('setup.cfg') }}-${{ hashFiles('docker/requirements.txt') }}
- name: Run Tests
run: make test
env:
SYSTEM_PYTHON: python${{ matrix.python-version }}
SECRET_KEY: github-actions
DATABASE_URL: postgres://postgres:postgres@localhost/${{ matrix.python-version }}
CELERY_BROKER_URL: redis://localhost:6379/0