Skip to content

Delete unused runtime.txt and use pyenv file instead. #1161

Delete unused runtime.txt and use pyenv file instead.

Delete unused runtime.txt and use pyenv file instead. #1161

name: Run Python tests
on:
push:
branches:
- 'main'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14.5
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Run linter
working-directory: ./project/thscoreboard
run: flake8
- name: Run tests
working-directory: ./project/thscoreboard
run: python manage.py test
env:
LOCAL_DATABASE_USER: postgres
LOCAL_DATABASE_PASSWORD: postgres