Skip to content

Commit 6a299e7

Browse files
committed
add logging
1 parent b0bdb75 commit 6a299e7

96 files changed

Lines changed: 17115 additions & 11280 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Industry-Grade CI/CD
1+
name: Full Stack CI/CD
22

33
on:
44
push:
@@ -7,8 +7,11 @@ on:
77
branches: [ "main" ]
88

99
jobs:
10-
test-and-build:
10+
backend-test:
1111
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: ./backend
1215

1316
steps:
1417
- name: Checkout code
@@ -19,10 +22,9 @@ jobs:
1922
with:
2023
python-version: '3.11'
2124

22-
- name: Install CI Dependencies
25+
- name: Install Dependencies
2326
run: |
2427
python -m pip install --upgrade pip
25-
pip install black ruff pytest pytest-cov
2628
pip install -r requirements.txt
2729
2830
- name: Code Quality (Ruff & Black)
@@ -32,17 +34,56 @@ jobs:
3234
# Ensure code is formatted correctly with Black
3335
black --check app/ tests/
3436
35-
- name: Run Unit Tests (with coverage)
37+
- name: Run Backend Tests (with coverage)
3638
run: |
37-
export PYTHONPATH=$PYTHONPATH:.
3839
python -m pytest tests/ --cov=app --cov-report=xml
3940
41+
frontend-test:
42+
runs-on: ubuntu-latest
43+
defaults:
44+
run:
45+
working-directory: ./frontend
46+
47+
steps:
48+
- name: Checkout code
49+
uses: actions/checkout@v3
50+
51+
- name: Set up Node.js
52+
uses: actions/setup-node@v3
53+
with:
54+
node-version: '18'
55+
cache: 'npm'
56+
cache-dependency-path: frontend/package-lock.json
57+
58+
- name: Install Dependencies
59+
run: npm ci
60+
61+
- name: Lint Frontend
62+
run: npm run lint
63+
64+
- name: Run Frontend Tests
65+
run: npm test -- run
66+
67+
build-docker:
68+
needs: [backend-test, frontend-test]
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Checkout code
72+
uses: actions/checkout@v3
73+
4074
- name: Set up Docker Buildx
4175
uses: docker/setup-buildx-action@v2
4276

43-
- name: Build Docker Image
44-
run: docker build -t informa-truth .
77+
- name: Build Backend Image
78+
uses: docker/build-push-action@v4
79+
with:
80+
context: ./backend
81+
push: false
82+
tags: informa-truth-backend:latest
4583

46-
- name: Test Docker Container
47-
run: |
48-
docker run --rm informa-truth python -m pytest tests/
84+
- name: Build Frontend Image
85+
uses: docker/build-push-action@v4
86+
with:
87+
context: ./frontend
88+
push: false
89+
tags: informa-truth-frontend:latest

Dockerfile

Lines changed: 0 additions & 27 deletions
This file was deleted.

README.md

Lines changed: 148 additions & 112 deletions
Large diffs are not rendered by default.

app/static/css/style.css

Lines changed: 0 additions & 192 deletions
This file was deleted.

0 commit comments

Comments
 (0)