CI/gitiea ci compatibility #1
@@ -6,13 +6,6 @@ on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
env:
|
||||
# WHY?: services are executed way before the env can be sourced from .env file
|
||||
# NOTE: still inlining these values because of gitea misbehaving with env loads
|
||||
DB_NAME: piku_test_db
|
||||
DB_USER: test
|
||||
DB_PASSWORD: password123
|
||||
|
||||
jobs:
|
||||
setup-environment:
|
||||
name: Generate Certificates
|
||||
@@ -69,10 +62,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup-environment
|
||||
services:
|
||||
postgres:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
env:
|
||||
POSTGRES_DB: piku_test_db
|
||||
POSTGRES_DB: piku__test
|
||||
POSTGRES_USER: test
|
||||
POSTGRES_PASSWORD: password123
|
||||
ports:
|
||||
@@ -99,17 +92,19 @@ jobs:
|
||||
run: |
|
||||
cp ../.env.example ../.env
|
||||
uv sync
|
||||
|
||||
- name: Lint & Test
|
||||
run: |
|
||||
export DB_NAME="piku__test"
|
||||
export DB_USER="test"
|
||||
export DB_PASSWORD="password123"
|
||||
if [ "$GITEA_ACTIONS" = "true" ]; then
|
||||
export DB_HOST="postgres"
|
||||
export DB_HOST="db"
|
||||
export DB_PORT="5432"
|
||||
else
|
||||
export DB_HOST="127.0.0.1"
|
||||
export DB_PORT="5442"
|
||||
fi
|
||||
|
||||
- name: Lint & Test
|
||||
run: |
|
||||
uv run ruff check
|
||||
uv run python manage.py test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user