Skip to content

requirements.txt

requirements.txt #63

Workflow file for this run

name: Python CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
echo "tzdata tzdata/Areas select America" | sudo debconf-set-selections
echo "tzdata tzdata/Zones/America select Chicago" | sudo debconf-set-selections
sudo apt-get update
sudo apt-get install -y python3-venv libsystemd-dev pkg-config
# You can add other necessary packages here
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest