Test Improvements #8
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: postgres | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
test: | |
name: postgres on python${{ matrix.python }} via ${{ matrix.os }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- python: "3.10" | |
- python: "3.13" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install uv | |
uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 | |
- name: Install postgresql | |
run: | | |
sudo apt-get install -y postgresql | |
- name: Allow postgresql to trust all | |
run: | | |
sudo sed -i -E '/local\s+all\s+/s/peer/trust/' /etc/postgresql/*/main/pg_hba.conf | |
sudo sed -i -E '/^host\s+all\s+all\s+/s/scram-sha-256/trust/' /etc/postgresql/*/main/pg_hba.conf | |
- name: Start postgresql | |
run: | | |
sudo systemctl restart postgresql | |
pg_isready | |
createdb -h localhost -p 5432 -U postgres shamantest | |
- name: Run tox | |
run: uv tool run tox -e postgres |