fix: use postgres hostname for CI DB and fix node setup
This commit is contained in:
@@ -27,8 +27,6 @@ jobs:
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -44,10 +42,16 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: pip install -r backend/requirements.txt -r backend/requirements-test.txt
|
||||
|
||||
- name: Run migrations
|
||||
working-directory: backend
|
||||
env:
|
||||
DATABASE_URL: postgresql+asyncpg://test:test@postgres:5432/gartenmanager_test
|
||||
run: alembic upgrade head
|
||||
|
||||
- name: Run tests
|
||||
working-directory: backend
|
||||
env:
|
||||
DATABASE_URL: postgresql+asyncpg://test:test@localhost:5432/gartenmanager_test
|
||||
DATABASE_URL: postgresql+asyncpg://test:test@postgres:5432/gartenmanager_test
|
||||
SECRET_KEY: ci-test-secret-key-min-32-characters
|
||||
run: pytest tests/ -v --cov=app --cov-report=xml --cov-report=term-missing
|
||||
|
||||
@@ -67,12 +71,10 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: npm
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: frontend
|
||||
run: npm ci
|
||||
run: npm install
|
||||
|
||||
- name: Lint
|
||||
working-directory: frontend
|
||||
|
||||
Reference in New Issue
Block a user