eksplicit mapping af envs
This commit is contained in:
54
.gitea/workflows/backend.yml
Normal file
54
.gitea/workflows/backend.yml
Normal file
@@ -0,0 +1,54 @@
|
||||
name: Backend CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "backend/**"
|
||||
pull_request:
|
||||
paths:
|
||||
- "backend/**"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: backend
|
||||
|
||||
services:
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
ports: ["6379:6379"]
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
env:
|
||||
POSTGRES_DB: sighej
|
||||
POSTGRES_USER: sighej
|
||||
POSTGRES_PASSWORD: sighej
|
||||
ports: ["5432:5432"]
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
cache: pip
|
||||
cache-dependency-path: backend/requirements*.txt
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements-dev.txt
|
||||
|
||||
- name: Lint (ruff)
|
||||
run: pip install ruff && ruff check .
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
REDIS_URL: redis://localhost:6379
|
||||
DATABASE_URL: postgresql+asyncpg://sighej:sighej@localhost:5432/sighej
|
||||
run: pytest -v
|
||||
34
.gitea/workflows/flutter.yml
Normal file
34
.gitea/workflows/flutter.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Flutter CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "app/**"
|
||||
pull_request:
|
||||
paths:
|
||||
- "app/**"
|
||||
|
||||
jobs:
|
||||
analyze-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: app
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: "3.22.x"
|
||||
channel: stable
|
||||
cache: true
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Analyze
|
||||
run: flutter analyze --no-fatal-infos
|
||||
|
||||
- name: Run tests
|
||||
run: flutter test
|
||||
Reference in New Issue
Block a user