-
Notifications
You must be signed in to change notification settings - Fork 21
40 lines (38 loc) · 1.11 KB
/
postgres.yml
File metadata and controls
40 lines (38 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: postgres
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
name: CI 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
- name: Run unit tests
run: tox -e py3
- name: Run tox
run: uv tool run tox -e postgresql