Wider t0 shift allowed. Robust image autorange and histogram. #173
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous integration | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
# To prevent this job from running, have "[skip ci]" or "[ci skip]" in the commit message | |
if: contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
exclude: | |
# pycifrw 4.4.4 is broken on Windows / python 3.10 | |
- os: windows-latest | |
python-version: "3.10" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v2 | |
if: startsWith(runner.os, 'Linux') | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }} | |
- uses: actions/cache@v2 | |
if: startsWith(runner.os, 'macOS') | |
with: | |
path: ~/Library/Caches/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }} | |
- uses: actions/cache@v2 | |
if: startsWith(runner.os, 'Windows') | |
with: | |
path: ~\AppData\Local\pip\Cache | |
key: ${{ runner.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('**/*requirements.txt') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install numpy wheel | |
pip install -r requirements.txt | |
pip install -r dev-requirements.txt | |
# Note the use of the -Wa flag to show DeprecationWarnings | |
- name: Unit tests | |
run: | | |
python setup.py install | |
cd ~ | |
python -Wa -m pytest --pyargs iris | |
- name: Build documentation | |
run: | | |
python setup.py build_sphinx | |
- name: Doctests | |
run: | | |
python -m sphinx -b doctest docs build | |
- name: Build artifacts | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ runner.os }}-py${{ matrix.python-version }}-artifact | |
path: dist/* | |
retention-days: 7 | |
release: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v2 | |
with: | |
path: artifacts/ | |
- name: Create release description | |
run: | | |
python release-description.py CHANGELOG.rst > description.md | |
cat description.md | |
- name: Move artifacts | |
run: | | |
ls --recursive artifacts/ | |
mkdir dist | |
mv --backup=numbered artifacts/*/** dist | |
rm -f dist/*~ | |
echo "To be uploaded:" | |
ls dist | |
- name: Create release | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
body_path: description.md | |
files: | | |
dist/* | |
- name: Upload to PyPI | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |