Skip to content

Commit

Permalink
[ci] drop branches, install coverage-lcov
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesBuchner committed Aug 5, 2023
1 parent 987a87f commit 0624854
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
shell: bash -l {0}
strategy:
matrix:
python-version: ['3.9.1', '3']
python-version: ['3.9.1', '3.11']
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand All @@ -38,18 +38,10 @@ jobs:
# conda does not support environment markers
- name: fix libstdc++ for scipy install
run: ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/share/miniconda/envs/test/lib/libstdc++.so.6
- name: Install testing dependencies (Python 3.6+)
if: ${{ !((matrix.python-version == '2.7') || (matrix.python-version == '3.5')) }}
run: |
conda install -c anaconda -c conda-forge --file requirements-linting-old.txt mypy types-six typed-ast
pip install git+https://github.com/JohannesBuchner/coverage-lcov
- name: Preinstall dependencies (Python 2.7) from anaconda
if: ${{ matrix.python-version == '2.7' }}
run: |
conda install -c anaconda --file requirements-linting-anaconda.txt
- name: Install testing dependencies
run: |
conda install -c conda-forge -c anaconda --file requirements-conda.txt --file requirements-linting-old.txt six packaging pytest coveralls coverage libstdcxx-ng
conda install -c conda-forge --file requirements-conda.txt --file requirements-linting-old.txt six packaging pytest coveralls coverage libstdcxx-ng
pip install git+https://github.com/JohannesBuchner/coverage-lcov
- name: Conda info
run: |
conda info
Expand All @@ -58,21 +50,16 @@ jobs:
# stop the build if there are Python syntax errors or undefined names
run: flake8 imagehash/ --show-source
- name: Check typing with mypy
if: ${{ !((matrix.python-version == '2.7') || (matrix.python-version == '3.5')) }}
run: mypy imagehash tests/*.py --follow-imports=silent --ignore-missing-imports || true
- name: Test install from setup.py
run: pip install .
- run: coverage run -m pytest .
- name: Convert coverage output to lcov for coveralls
# coverage-lcov requires python 3.6, so we cannot upload results
# from python 2 and 3.5 builds :-(
if: ${{ !((matrix.python-version == '2.7') || (matrix.python-version == '3.5')) }}
run: |
coverage-lcov
# make paths relative
sed -i s,$PWD/,,g lcov.info
- name: prepare coveralls partial upload
if: ${{ !((matrix.python-version == '2.7') || (matrix.python-version == '3.5')) }}
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
Expand Down

0 comments on commit 0624854

Please sign in to comment.