Skip to content

Commit

Permalink
ci cd
Browse files Browse the repository at this point in the history
  • Loading branch information
tedoaba committed Oct 28, 2024
1 parent bfc2477 commit b04d968
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
25 changes: 1 addition & 24 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,38 +21,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'

# Cache pip dependencies to speed up the build
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
python-version: '3.10'

# Install dependencies
- name: Install dependencies
run: |
pip install -r requirements.txt
# Run linting with flake8 to ensure code quality
- name: Lint code
run: |
pip install flake8
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# Run unit tests using pytest
- name: Run tests
run: |
pip install pytest pandas
pytest tests --maxfail=1 --disable-warnings
# Optionally, upload test results
- name: Upload test results (optional)
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results
path: test-results.xml
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use official Python image
FROM python:3.10
FROM python:3.11

# Set environment variables for Flask
ENV PYTHONUNBUFFERED=1
Expand Down

0 comments on commit b04d968

Please sign in to comment.