Add test workflow, fix deprecations, update dependencies (#289) #6
This file contains 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: Run Tests | |
on: push | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Create .env file | |
run: | | |
echo "PG_USERNAME=${{ secrets.PG_USERNAME }}" >> .env | |
echo "PG_PASSWORD=${{ secrets.PG_PASSWORD }}" >> .env | |
echo "PG_HOST=${{ secrets.PG_HOST }}" >> .env | |
echo "PG_PORT=${{ secrets.PG_PORT }}" >> .env | |
echo "PG_DATABASE=${{ secrets.PG_DATABASE }}" >> .env | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry install --with dev | |
- name: Run tests | |
run: | | |
poetry run pytest |