Skip to content

Fix setuptools error in tests github actions #4

Fix setuptools error in tests github actions

Fix setuptools error in tests github actions #4

Workflow file for this run

name: Tests python 3.10
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
# the curl fix ModuleNotFoundError: No module named 'pkg_resources'
run: |
sudo apt-get install -y gnupg2
curl https://bootstrap.pypa.io/ez_setup.py | python
- 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
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
- 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
curl https://bootstrap.pypa.io/ez_setup.py | python
- 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
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
- 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
# the curl fix ModuleNotFoundError: No module named 'pkg_resources'
run: |
brew install gnupg
curl https://bootstrap.pypa.io/ez_setup.py | python
- 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
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
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.xml