Skip to content

Add coverage lcov requirement to convert coverage file to lcov #7

Add coverage lcov requirement to convert coverage file to lcov

Add coverage lcov requirement to convert coverage file to lcov #7

Workflow file for this run

name: Run tests in Ubuntu and Mac
on:
workflow_call:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
tests-with-coverage-3-12:
name: Run tests on Ubuntu latest py3.12
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install depedencies
# python-setuptools fix ModuleNotFoundError: No module named 'pkg_resources'
run: |
sudo apt-get install -y gnupg2 python-setuptools
- name: Setup Python 3.12.2
uses: actions/setup-python@v5
with:
python-version: "3.12.2"
cache: "pip"
cache-dependency-path: '**/setup.py'
- name: Install requirements
run: |
python -m pip install --upgrade pip coverage-lcov
pip install -e . -r requirements/test.txt
- name: Run tests with coverage
run: |
pytest --cov=. --cov-report=term --cov-report=xml:coverage.xml --color=yes && coverage-lcov
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.xml
tests-with-coverage-3-5:
name: Run tests on Ubuntu 20.04 py3.5
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install depedencies
run: |
sudo apt-get install -y gnupg2 python-setuptools
- name: Setup Python 3.5.4
uses: actions/setup-python@v5
with:
python-version: "3.5.4"
cache: "pip"
cache-dependency-path: '**/setup.py'
- name: Install requirements
run: |
python -m pip install --upgrade pip coverage-lcov
pip install -e . -r requirements/test.txt
- name: Run tests with coverage
run: |
pytest --cov=. --cov-report=term --cov-report=xml:coverage.xml --color=yes && coverage-lcov
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.xml
tests-with-coverage-mac:
name: Run tests on macos 11 py3.12
runs-on: macos-11
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install depedencies
run: |
brew install gnupg
sudo pip3 install setuptools
- name: Setup Python 3.12.2
uses: actions/setup-python@v5
with:
python-version: "3.12.2"
cache: "pip"
cache-dependency-path: '**/setup.py'
- name: Install requirements
run: |
python -m pip install --upgrade pip coverage-lcov
pip install -e . -r requirements/test.txt
- name: Run tests with coverage
run: |
pytest --cov=. --cov-report=term --cov-report=xml:coverage.xml --color=yes && coverage-lcov
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.xml