Skip to content

Authors can be linked to matching accounts more easily #362

Authors can be linked to matching accounts more easily

Authors can be linked to matching accounts more easily #362

Workflow file for this run

on:
push:
branches:
- master
- main
- r-v**
pull_request:
branches:
- master
- main
- r-v**
jobs:
build_and_test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout the codebase
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up environment variables
run: |
echo "DB_VENDOR=sqlite" >> "$GITHUB_ENV"
echo "JANEWAY_SETTINGS_MODULE=core.janeway_global_settings" >> "$GITHUB_ENV"
- name: Install all dependencies
run: |
python -m pip install --upgrade pip
pip install --src lib/ -r requirements.txt -r dev-requirements.txt
- name: Check code formatting with Ruff
run: |
echo "Running formatting check..."
ruff format --check .
echo "Formatting check completed."
- name: Check presence of unmigrated model changes
run: |
echo "Running migration checks..."
python src/manage.py makemigrations --check
echo "Migration checks completed."
- name: Run Django unit tests
run: |
echo "Running unit tests"
python src/manage.py test
echo "Test run completed."
- name: Run python compatibility tests (tox)
run: |
echo "Installing tox gh actions package"
pip install tox-gh-actions
echo "Running tox tests"
tox
echo "Tox run completed."
- name: Test installing Janeway
run: |
echo "Test Installing Janeway"
python src/manage.py install_janeway --use-defaults
echo "Test run completed."