Skip to content

Complete refactoring of the project #167

Complete refactoring of the project

Complete refactoring of the project #167

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
paths-ignore:
- 'LICENSE'
- 'README.md'
pull_request:
paths-ignore:
- 'LICENSE'
- 'README.md'
jobs:
Baseline:
strategy:
fail-fast: false
matrix:
# Ubuntu 20.04 python3 = 3.8
# Ubuntu 22.04 python3 = 3.10
os: [ubuntu-20.04, ubuntu-latest]
py: [python3.7, python3.9, python3]
runs-on: ${{ matrix.os }}
env:
PYTHON: ${{ matrix.py }}
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
sudo add-apt-repository ppa:deadsnakes/ppa
scripts/install-deps.sh
- name: Install pipenv
run: |
${{ matrix.py }} -m pip install pipenv
pipenv install --dev
- name: Run tests
run: pipenv run pytest test/
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
python3 -m pip install pipenv
pipenv install --dev
scripts/install-deps.sh
- name: flake8
run: pipenv run flake8
- name: pylint
run: |
pipenv run pylint src test
pipenv run pylint -d duplicate-code,invalid-name test/templates/*.py
Coverage:
needs: [Lint, Baseline]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
python3 -m pip install pipenv
pipenv install --dev
scripts/install-deps.sh
# Install packages to system python because that will be used by GDB.
# This is needed so we get correct coverage report when testing GDB
# integration. Otherwise Python code executed by GDB integration does
# not get calculated as covered.
pipenv run pip freeze > requirements.txt
pip3 install -r requirements.txt
- name: Run tests
run: pipenv run pytest --cov-report xml --cov=src test/
- name: Codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml