Skip to content

Bump version: 0.16.1-dev.0 → 0.16.1-dev.1 #1664

Bump version: 0.16.1-dev.0 → 0.16.1-dev.1

Bump version: 0.16.1-dev.0 → 0.16.1-dev.1 #1664

Workflow file for this run

name: RavenPy
on:
push:
branches:
- master
pull_request:
env:
RAVEN_TESTING_DATA_BRANCH: master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
permissions:
contents: read
jobs:
lint:
name: Code linting
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
files.pythonhosted.org:443
github.com:443
pypi.org:443
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: "3.x"
cache: pip
- name: Install CI libraries
run: |
python -m pip install --require-hashes -r CI/requirements_ci.txt
- name: Run linting suite
run: |
python -m tox -e lint
pip:
name: Test with Python${{ matrix.python-version }} (tox, ${{ matrix.os }}), upstream=${{ matrix.upstream-branch }})
needs: lint
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ] # 'macos-latest' disabled until a new build of raven-hydro is available
python-version: [ "3.9", "3.11", "3.12" ]
tox-env: [ 'false' ]
# - "3.13" # not yet supported by dependencies
include:
- os: 'ubuntu-latest'
python-version: '3.10'
tox-env: 'py3.10-coveralls-upstream'
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
azure.archive.ubuntu.com:80
coveralls.io:443
esm.ubuntu.com:443
files.pythonhosted.org:443
github.com:443
motd.ubuntu.com:443
objects.githubusercontent.com:443
packages.microsoft.com:443
pavics.ouranos.ca:443
pypi.org:443
raw.githubusercontent.com:443
test.opendap.org:80
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install GDAL (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install libgdal-dev
- name: Install GDAL (macOS)
if: matrix.os == 'macos-latest'
uses: tecolicom/actions-use-homebrew-tools@b9c066b79607fa3d71e0be05d7003bb75fd9ff34 # v1.3
with:
tools: gdal
cache: "yes"
- name: Set GDAL_VERSION (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
echo "GDAL_VERSION=$(gdal-config --version)" >> $GITHUB_ENV
- name: Set GDAL_VERSION (macOS)
if: matrix.os == 'macos-latest'
run: |
echo "GDAL_VERSION=$(gdalinfo --version | awk '{print $2}' | sed s'/.$//')" >> $GITHUB_ENV
- name: Install CI libraries
run: |
python3 -m pip install --require-hashes -r CI/requirements_ci.txt
- name: Test with tox and report coverage
run: |
if [ "${{ matrix.tox-env }}" != "false" ]; then
python3 -m tox -e ${{ matrix.tox-env }}
else
python3 -m tox -e py${{ matrix.python-version }}-coveralls
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: run-Python${{ matrix.python-version }}-${{ matrix.os }}
COVERALLS_PARALLEL: true
COVERALLS_SERVICE_NAME: github
UPSTREAM_BRANCH: ${{ matrix.upstream-branch }}
conda:
name: Test with Python${{ matrix.python-version }} (Anaconda, ${{ matrix.os }})
needs: lint
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ]
# - macos-latest # disabled until a new build of raven-hydro is available
# - windows-latest # disabled until xesmf is available
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
defaults:
run:
shell: bash -l {0}
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
conda.anaconda.org:443
coveralls.io:443
files.pythonhosted.org:443
github.com:443
objects.githubusercontent.com:443
pavics.ouranos.ca:443
pypi.org:443
raw.githubusercontent.com:443
test.opendap.org:80
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Patch Environment File
if: matrix.os == 'windows-latest'
run: |
sed -i 's/climpred >=2.4.0/xesmf/' environment.yml
- name: Setup Conda (Micromamba) with Python${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@617811f69075e3fd3ae68ca64220ad065877f246 # v2.0.0
with:
cache-downloads: true
cache-environment: true
cache-environment-key: environment-${{ matrix.python-version }}-${{ matrix.os }}-${{ github.head_ref }}
environment-file: environment-dev.yml
create-args: >-
python=${{ matrix.python-version }}
micromamba-version: "1.5.10-0" # pinned to avoid breaking changes with mamba and micromamba (2.0.0).
- name: Install RavenPy
run: |
python -m pip install -e ".[dev,gis]"
- name: List installed packages
run: |
micromamba list
python -m pip check || true
- name: Test RavenPy
run: |
python -m pytest --cov --numprocesses=logical
- name: Report coverage
run: |
python -m coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: run-conda_${{ matrix.python-version }}_${{ matrix.os }}
COVERALLS_PARALLEL: true
COVERALLS_SERVICE_NAME: github
finish:
needs:
- pip
- conda
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
disable-sudo: true
egress-policy: audit
- name: Coveralls Finished
uses: coverallsapp/github-action@cfd0633edbd2411b532b808ba7a8b5e04f76d2c8 # v2.3.4
with:
parallel-finished: true