Skip to content

Brittleru/refactoring and adding tests #7

Brittleru/refactoring and adding tests

Brittleru/refactoring and adding tests #7

Workflow file for this run

name: Ubuntu
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
name: Python ${{ matrix.python-version }} on Ubuntu
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install xvfb
run: sudo apt-get install -y xvfb
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install .[dev]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
flake8 drone_base/ --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 drone_base/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run tests with pytest and coverage
run: |
xvfb-run -a pytest --cov=drone_base --cov-report=xml