Skip to content

Create ci.yml

Create ci.yml #4

Workflow file for this run

name: Backend CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r src/dashboard_api/requirements.txt
- name: Run Tests with Pytest
run: |
pytest src/tests/
- name: Build API Docker Image
run: |
docker build --file src/dashboard_api/Dockerfile . --tag dynamic-pricing-api:latest
- name: Build UI Docker Image
run: |
docker build --file ui/Dockerfile ./ui --tag dynamic-pricing-ui:latest