Skip to content

* askbot/conf/group_settings.py: #11

* askbot/conf/group_settings.py:

* askbot/conf/group_settings.py: #11

Workflow file for this run

name: Github tests
on: [push]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
max-parallel: 4
matrix:
python-version: [3.11.7]
# services:
# postgres:
# image: postgres:13.6
# env: # must match with settings from $DJANGO_SETTINGS_MODULE
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: postgres
# POSTGRES_DB: github-actions
# ports:
# - 5432:5432 # exposing 5432 port for application to use
# # needed because the postgres container does not provide a healthcheck
# options: >-
# --health-cmd pg_isready --health-interval 10s
# --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# see https://github.com/pre-commit/action/#using-this-action
- name: pre-commit checks
uses: pre-commit/[email protected]
env:
# it's okay for github to commit to main/master
SKIP: no-commit-to-branch
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools-rust
# replacement for "python setup.py install"
# See also https://packaging.python.org/en/latest/discussions/setup-py-deprecated/#setup-py-deprecated
python -m pip install .
pip install -r requirements-tests.txt
cat askbot_setup_test_inputs.txt | askbot-setup
- name: Run tests
run: |
cd askbot_site
ln -s ../askbot/tests .
python manage.py test tests
# env:
# # Variables for unit tests
# DJANGO_SETTINGS_MODULE: settings
# # For Django encryption
# SECRET_KEY: some_value
# RECAPTCHA_PRIVATE_KEY: some_key
# # must match postgres service above
# DATABASE_URL: postgres://postgres:postgres@localhost:5432/default