Skip to content

Bump scipy from 1.13.0 to 1.13.1 (#22) #131

Bump scipy from 1.13.0 to 1.13.1 (#22)

Bump scipy from 1.13.0 to 1.13.1 (#22) #131

Workflow file for this run

name: Wayfarer Python Package
# see https://stackoverflow.com/a/56422603/179520
env:
PY_IGNORE_IMPORTMISMATCH: 1
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# https://docs.github.com/en/actions/guides/building-and-testing-python#caching-dependencies
# caching of pip files
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install project and dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install .
- name: Install demo dependencies
run: |
pip install -r requirements.demo.txt
- name: Lint with flake8
run: |
flake8 .
- name: Check types with mypy
run: |
mypy wayfarer tests scripts
#- name: Test doctests with pytest
# run: |
# PYTHONPATH=. pytest --doctest-modules
- name: Test with pytest
run: |
PYTHONPATH=. pytest --doctest-modules --cov wayfarer --cov-report= tests/
- name: Upload coverage data to coveralls.io
run: |
coveralls
env:
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
COVERALLS_PARALLEL: true
# get token from https://coveralls.io/github/compassinformatics/wayfarer
# and then add to https://github.com/compassinformatics/wayfarer/settings/secrets/actions
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build wheel and source distributions
run: |
pip install wheel
pip install build
python -m build --wheel
python -m build --sdist
- name: Build docs
run: |
sphinx-build -b html docs build/html/
- name: Deploy gh-pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/html
destination_dir: .
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.python-version == '3.10'
uses: pypa/gh-action-pypi-publish@release/v1
with:
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
# see https://github.com/marketplace/actions/coveralls-github-action
# we can't use coveralls-github-action as it doesn't support xml output
# see https://coveralls-python.readthedocs.io/en/latest/usage/configuration.html#github-actions-support
coveralls:
name: Indicate completion to coveralls.io
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}