Skip to content

work around 404 Not Found for ubuntu-toolchain-r #169

work around 404 Not Found for ubuntu-toolchain-r

work around 404 Not Found for ubuntu-toolchain-r #169

Workflow file for this run

name: Build
on:
push:
pull_request:
schedule:
- cron: '42 4 5,20 * *'
env:
CACHE_NUMBER: 0 # increase to reset cache manually
jobs:
run-tests:
name: Run tests
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: ['2.7', '3.6', '3.9.1', '3']
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Set cache date
run: echo "DATE=$(date +'%Y%m')" >> $GITHUB_ENV
- name: Conda download cache
id: myconda-download-cache
uses: actions/cache@v3
with:
path: /usr/share/miniconda/pkgs/
key: ${{ matrix.python-version }}-conda-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
- name: Install imagemagick
run: |
sudo apt-get install -y imagemagick libstdc++6 || true
# 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 coverage-lcov mypy types-six typed-ast
- 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
- name: Conda info
run: |
conda info
conda list
- name: Lint with flake8
# 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 }}
path-to-lcov: lcov.info
flag-name: run-${{ matrix.python-version }}
parallel: true
finish:
needs: run-tests
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true