Skip to content

Commit b2e3892

Browse files
committed
updated docker build
1 parent 1dd7804 commit b2e3892

File tree

2 files changed

+93
-2
lines changed

2 files changed

+93
-2
lines changed

.github/codecov.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Codecov configuration with flags for different parts of the application
2+
3+
coverage:
4+
precision: 2
5+
round: down
6+
range: "70...100"
7+
status:
8+
project:
9+
default:
10+
target: auto
11+
threshold: 1%
12+
patch:
13+
default:
14+
target: 90%
15+
16+
# Define flag management rules
17+
flag_management:
18+
default_rules:
19+
carryforward: true
20+
statuses:
21+
- type: project
22+
target: auto
23+
threshold: 1%
24+
- type: patch
25+
target: 80%
26+
individual_flags:
27+
- name: backend
28+
paths:
29+
- backend/
30+
carryforward: true
31+
statuses:
32+
- type: project
33+
target: auto
34+
threshold: 1%
35+
- type: patch
36+
target: 80%
37+
- name: caching_celary_redis
38+
paths:
39+
- backend/apps/core/
40+
carryforward: true
41+
- name: credits
42+
paths:
43+
- backend/apps/credits/
44+
carryforward: true
45+
- name: monitoring
46+
paths:
47+
- backend/apps/monitoring/
48+
carryforward: true
49+
- name: stripe
50+
paths:
51+
- backend/apps/stripe_home/
52+
carryforward: true
53+
- name: users
54+
paths:
55+
- backend/apps/users/
56+
carryforward: true
57+
- name: supabase_home
58+
paths:
59+
- backend/apps/supabase_home/
60+
carryforward: true
61+
62+
# Ignore patterns
63+
ignore:
64+
- "**/migrations/**"
65+
- "**/admin.py"
66+
- "**/__init__.py"
67+
- "**/apps.py"
68+
69+
# Comment behavior on pull requests
70+
comment:
71+
layout: "reach, diff, flags, files"
72+
behavior: default
73+
require_changes: false
74+
require_base: no
75+
require_head: yes

.github/workflows/ci-cd.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ jobs:
135135
run: |
136136
cd backend
137137
# Clear cache before tests to ensure proper isolation
138+
<<<<<<< HEAD
138139
DJANGO_SETTINGS_MODULE=config.settings python -c "import django; django.setup(); from django.core.cache import cache; cache.clear()"
139140

140141
# Run all backend tests and generate combined coverage
@@ -145,6 +146,18 @@ jobs:
145146

146147
# Run integration tests
147148
DJANGO_SETTINGS_MODULE=config.settings python -m pytest tests/test_integration.py --cov=. --cov-report=xml:integration-coverage.xml --junitxml=integration-junit.xml -o junit_family=legacy
149+
=======
150+
python -c "import django; django.setup(); from django.core.cache import cache; cache.clear()"
151+
152+
# Run all backend tests and generate combined coverage
153+
python -m pytest --cov=. --cov-report=xml:coverage.xml --junitxml=junit.xml -o junit_family=legacy
154+
155+
# Run API-specific tests
156+
python -m pytest api/ --cov=api --cov-report=xml:api-coverage.xml --junitxml=api-junit.xml -o junit_family=legacy
157+
158+
# Run integration tests
159+
python -m pytest tests/test_integration.py --cov=. --cov-report=xml:integration-coverage.xml --junitxml=integration-junit.xml -o junit_family=legacy
160+
>>>>>>> e98d056 (updated docker build)
148161

149162
# Ensure all coverage files exist (create empty if needed)
150163
for file in coverage.xml api-coverage.xml integration-coverage.xml; do
@@ -153,9 +166,12 @@ jobs:
153166
fi
154167
done
155168

169+
<<<<<<< HEAD
156170
# Clear cache after tests to ensure clean state for next run
157171
DJANGO_SETTINGS_MODULE=config.settings python -c "import django; django.setup(); from django.core.cache import cache; cache.clear()"
158172

173+
=======
174+
>>>>>>> e98d056 (updated docker build)
159175
- name: Upload Coverage to Codecov
160176
uses: codecov/codecov-action@v3
161177
with:
@@ -226,8 +242,8 @@ jobs:
226242
file: ./docker/Dockerfile
227243
push: true
228244
tags: |
229-
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ steps.set-env.outputs.env }}
230-
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
245+
ghcr.io/${{ steps.repo-vars.outputs.repo_owner }}/${{ steps.repo-vars.outputs.repo_name }}:${{ steps.set-env.outputs.env }}
246+
ghcr.io/${{ steps.repo-vars.outputs.repo_owner }}/${{ steps.repo-vars.outputs.repo_name }}:${{ github.sha }}
231247
cache-from: type=local,src=/tmp/.buildx-cache
232248
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
233249
build-args: |

0 commit comments

Comments
 (0)