Skip to content

Merge branch 'main' into docs/opensearch-change-deployment #4049

Merge branch 'main' into docs/opensearch-change-deployment

Merge branch 'main' into docs/opensearch-change-deployment #4049

Workflow file for this run

name: 1 - Commit
on: [push]
permissions:
contents: read
env:
PY_VERSION: "3.12.13"
POETRY_VERSION: "latest"
jobs:
lint:
runs-on: ubuntu-latest
name: Python Lint
steps:
- name: Check out the code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Set up Python ${{ env.PY_VERSION }}
uses: actions/setup-python@v6
with:
python-version: ${{ env.PY_VERSION }}
- name: Install Poetry
uses: abatilo/actions-poetry@v4
with:
poetry-version: ${{ env.POETRY_VERSION }}
poetry-plugins: "poetry-plugin-export"
- name: Install Dependencies
run: |
poetry env use ${{ env.PY_VERSION }}
poetry install
- name: Run linting
run: make lint-check
test:
environment: development
env:
CF_SERVICE_USER: ${{secrets.CF_SERVICE_USER}}
CF_SERVICE_AUTH: ${{secrets.CF_SERVICE_AUTH}}
FLASK_APP_SECRET_KEY: ${{secrets.FLASK_APP_SECRET_KEY}}
runs-on: ubuntu-latest
name: Pytests
steps:
- name: Check out the code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Create local .env from sample
run: cp .env.sample .env
- name: Set up Python ${{ env.PY_VERSION }}
uses: actions/setup-python@v6
with:
python-version: ${{ env.PY_VERSION }}
- name: Install Poetry
uses: abatilo/actions-poetry@v4
with:
poetry-version: ${{ env.POETRY_VERSION }}
poetry-plugins: "poetry-plugin-export"
- name: Install Dependencies
run: |
poetry env use ${{ env.PY_VERSION }}
poetry install
- name: Run Pytest
run: make test-ci
- name: Verify database/interface.py imports standalone
run: poetry run python -c "import database.interface"
- name: Verify migrations match vendored models
run: docker compose exec -T app flask db check
- name: Report test coverage
uses: MishaKav/pytest-coverage-comment@main
continue-on-error: true
with:
multiple-files: |
Unit tests, pytest-coverage-unit.txt, pytest-unit.xml
Integration Tests, pytest-coverage-integration.txt, pytest-integration.xml
Functional Tests, pytest-coverage-functional.txt, pytest-functional.xml