Fahad Mattoo
Simple app (#5) (#6)
d4a7025 unverified
raw
history blame
1.33 kB
name: lint-and-test
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run pylint
run: |
pylint $(git ls-files '*.py')
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run pytest with coverage
run: |
pytest --cov=src --cov-report=term-missing --cov-branch