Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
sed19015 authored Apr 18, 2025
2 parents 3da2ae6 + 04ffc3f commit ed356df
Show file tree
Hide file tree
Showing 13 changed files with 1,502 additions and 9 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Backend CI Pipeline

# Trigger workflow on push or pull request to develop and main branches
on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11' # Adjust Python version if needed

- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Run pylint on Python code
run: |
source venv/bin/activate
pylint backend/main.py backend/db.py backend/init_db.py # Add more files as needed
test:
runs-on: ubuntu-latest
needs: lint # Ensure this job runs after linting

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Run tests with pytest
run: |
source venv/bin/activate
pytest backend/tests --maxfail=1 --disable-warnings -q
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/backend/animal_shelter.db
/backend/test_animal_shelter.db
/frontend/node_modules

# ignore sqlite db file
animal_shelter.db
Loading

0 comments on commit ed356df

Please sign in to comment.