Skip to content

Commit c8632ad

Browse files
Create ci.yml
1 parent 79e279f commit c8632ad

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Backend CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python 3.11
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.11'
20+
21+
- name: Install Dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r src/dashboard_api/requirements.txt
25+
26+
- name: Run Tests with Pytest
27+
run: |
28+
pytest src/tests/
29+
30+
- name: Build API Docker Image
31+
run: |
32+
docker build --file src/dashboard_api/Dockerfile . --tag dynamic-pricing-api:latest
33+
34+
- name: Build UI Docker Image
35+
run: |
36+
docker build --file ui/Dockerfile ./ui --tag dynamic-pricing-ui:latest

0 commit comments

Comments
 (0)