Skip to content

update test workflow to create storage directory and adjust base path… #18

update test workflow to create storage directory and adjust base path…

update test workflow to create storage directory and adjust base path… #18

Workflow file for this run

name: Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mirromutth/mysql-action@v1.1
with:
mysql database: "hermadata_test" # Optional, default value is "test". The specified database which will be create
mysql root password: "dev"
- name: Set up Python
# This is the version of the action for setting up Python, not the Python version.
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact version of a Python version
python-version: "3.x"
# Optional - x64 or x86 architecture, defaults to x64
architecture: "x64"
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
cd backend
python -m pip install --upgrade pip
pip install .
pip install pytest httpx pytest-env pytest-dotenv
- name: Database migrations
run: |
cd backend
alembic -c tests/alembic.ini upgrade head
- name: Run tests
run: |
cd backend
mkdir tests/storage
pytest