Make features display as bullet points #19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.12"] | |
poetry-version: [latest] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_DB: test_db | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install project | |
run: poetry install | |
- name: Set env variables for pytest | |
run: | | |
echo "DB_USER=postgres" >> $GITHUB_ENV | |
echo "DB_PASSWORD=postgres" >> $GITHUB_ENV | |
echo "DB_HOST=127.0.0.1" >> $GITHUB_ENV | |
echo "DB_PORT=5432" >> $GITHUB_ENV | |
echo "DB_NAME=test_db" >> $GITHUB_ENV | |
echo "SECRET_KEY=$(openssl rand -base64 32)" >> $GITHUB_ENV | |
echo "BASE_URL=http://localhost:8000" >> $GITHUB_ENV | |
- name: Verify environment variables | |
run: | | |
echo "Checking if required environment variables are set..." | |
[ -n "$DB_USER" ] && \ | |
[ -n "$DB_PASSWORD" ] && \ | |
[ -n "$DB_HOST" ] && \ | |
[ -n "$DB_PORT" ] && \ | |
[ -n "$DB_NAME" ] && \ | |
[ -n "$SECRET_KEY" ] | |
- name: Run type checking with mypy | |
run: poetry run mypy . | |
- name: Run tests with pytest | |
run: poetry run pytest -s tests/ |