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_NAME: piku_test_db
|
||||||
DB_USER: test
|
DB_USER: test
|
||||||
DB_PASSWORD: password123
|
DB_PASSWORD: password123
|
||||||
DB_HOST: 127.0.0.1
|
|
||||||
DB_PORT: 5442
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup-environment:
|
setup-environment:
|
||||||
@@ -95,13 +93,19 @@ jobs:
|
|||||||
path: certs
|
path: certs
|
||||||
key: certs-${{ runner.os }}-${{ github.sha }}
|
key: certs-${{ runner.os }}-${{ github.sha }}
|
||||||
|
|
||||||
- name: Setup DB connection Variables
|
- name: Lint & Test
|
||||||
run: |
|
run: |
|
||||||
cp ../.env.example ../.env
|
cp ../.env.example ../.env
|
||||||
uv sync
|
uv sync
|
||||||
|
|
||||||
- name: Lint & Test
|
if [ "$GITEA_ACTIONS" = "true" ]; then
|
||||||
run: |
|
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 ruff check
|
||||||
uv run python manage.py test
|
uv run python manage.py test
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user