ci: refactor database environment variable configuration for Gitea Actions compatibility
This commit is contained in:
@@ -11,8 +11,6 @@ env:
|
||||
DB_NAME: piku_test_db
|
||||
DB_USER: test
|
||||
DB_PASSWORD: password123
|
||||
DB_HOST: 127.0.0.1
|
||||
DB_PORT: 5442
|
||||
|
||||
jobs:
|
||||
setup-environment:
|
||||
@@ -95,13 +93,19 @@ jobs:
|
||||
path: certs
|
||||
key: certs-${{ runner.os }}-${{ github.sha }}
|
||||
|
||||
- name: Setup DB connection Variables
|
||||
- name: Lint & Test
|
||||
run: |
|
||||
cp ../.env.example ../.env
|
||||
uv sync
|
||||
|
||||
- name: Lint & Test
|
||||
run: |
|
||||
|
||||
if [ "$GITEA_ACTIONS" = "true" ]; then
|
||||
export DB_HOST="postgres"
|
||||
export DB_PORT="5432"
|
||||
else
|
||||
export DB_HOST="127.0.0.1"
|
||||
export DB_PORT="5442"
|
||||
fi
|
||||
|
||||
uv run ruff check
|
||||
uv run python manage.py test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user