File tree Expand file tree Collapse file tree 3 files changed +8
-23
lines changed Expand file tree Collapse file tree 3 files changed +8
-23
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ SECRET_KEY=
5
5
BASE_URL = http://localhost:8000
6
6
7
7
# Database
8
- DB_USER =
9
- DB_PASSWORD =
10
- DB_HOST = localhost
8
+ DB_USER = postgres
9
+ DB_PASSWORD = postgres
10
+ DB_HOST = 127.0.0.1
11
11
DB_PORT = 5432
12
12
DB_NAME =
13
13
Original file line number Diff line number Diff line change 11
11
strategy :
12
12
fail-fast : false
13
13
matrix :
14
- python-version : ["3.12 "]
14
+ python-version : ["3.13 "]
15
15
os : [ubuntu-latest]
16
16
17
17
runs-on : ${{ matrix.os }}
20
20
postgres :
21
21
image : postgres:latest
22
22
env :
23
- POSTGRES_DB : test_db
23
+ POSTGRES_DB : db
24
24
POSTGRES_USER : postgres
25
25
POSTGRES_PASSWORD : postgres
26
26
ports :
45
45
- name : Install project
46
46
run : uv sync --all-extras --dev
47
47
48
- - name : Set env variables for pytest
49
- run : |
50
- echo "DB_HOST=127.0.0.1" >> $GITHUB_ENV
51
- echo "DB_PORT=5432" >> $GITHUB_ENV
52
- echo "DB_USER=postgres" >> $GITHUB_ENV
53
- echo "DB_PASSWORD=postgres" >> $GITHUB_ENV
54
-
55
- - name : Verify environment variables
56
- run : |
57
- echo "Checking if required environment variables are set..."
58
- [ -n "$DB_HOST" ] && \
59
- [ -n "$DB_PORT" ] && \
60
- [ -n "$DB_USER" ] && \
61
- [ -n "$DB_PASSWORD" ]
62
-
63
48
- name : Run type checking with mypy
64
49
run : uv run mypy .
65
50
Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ def env_vars(monkeypatch):
25
25
# monkeypatch remaining env vars
26
26
with monkeypatch .context () as m :
27
27
# Get valid db user, password, host, and port from env
28
- m .setenv ("DB_HOST" , os .getenv ("DB_HOST" , "localhost " ))
28
+ m .setenv ("DB_HOST" , os .getenv ("DB_HOST" , "127.0.0.1 " ))
29
29
m .setenv ("DB_PORT" , os .getenv ("DB_PORT" , "5432" ))
30
- m .setenv ("DB_USER" , os .getenv ("DB_USER" , "appuser " ))
31
- m .setenv ("DB_PASSWORD" , os .getenv ("DB_PASSWORD" , "testpassword " ))
30
+ m .setenv ("DB_USER" , os .getenv ("DB_USER" , "postgres " ))
31
+ m .setenv ("DB_PASSWORD" , os .getenv ("DB_PASSWORD" , "postgres " ))
32
32
m .setenv ("SECRET_KEY" , "testsecretkey" )
33
33
m .setenv ("HOST_NAME" , "Test Organization" )
34
34
m .setenv ("DB_NAME" , "qual2db4-test-db" )
You can’t perform that action at this time.
0 commit comments