Skip to content

Commit 9c6cb16

Browse files
Copilotwdconinc
andcommitted
Set PostgreSQL environment variables at job level
Moved PGHOST, PGPORT, PGDATABASE, PGUSER, PGPASSWORD environment variables from individual steps to the job level to avoid duplication and make the workflow cleaner. Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
1 parent bed2145 commit 9c6cb16

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ jobs:
2323
os: [ubuntu-latest] # TODO re-enable: , macos-latest]
2424
python-version: ['3.10', '3.11', '3.12', '3.13']
2525

26+
env:
27+
PGHOST: localhost
28+
PGPORT: 5432
29+
PGDATABASE: test
30+
PGUSER: test
31+
PGPASSWORD: test
32+
2633
services:
2734
postgres:
2835
image: postgres:16
@@ -138,11 +145,6 @@ jobs:
138145
env:
139146
CC: ${{ runner.os == 'Linux' && 'gcc-14' || 'gcc' }}
140147
CXX: ${{ runner.os == 'Linux' && 'g++-14' || 'g++' }}
141-
PGHOST: localhost
142-
PGPORT: 5432
143-
PGDATABASE: test
144-
PGUSER: test
145-
PGPASSWORD: test
146148
- name: Build and install Python package
147149
run: |
148150
pip install . --verbose
@@ -153,9 +155,3 @@ jobs:
153155
- name: Run Python tests
154156
run: |
155157
pytest tests/python/ -v
156-
env:
157-
PGHOST: localhost
158-
PGPORT: 5432
159-
PGDATABASE: test
160-
PGUSER: test
161-
PGPASSWORD: test

0 commit comments

Comments
 (0)