[pre-commit.ci] pre-commit autoupdate #254
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
# A workflow to do PR test runs | |
# | |
# Reference: | |
# - https://github.com/actions/checkout | |
# - https://github.com/conda-incubator/setup-miniconda | |
name: ci-tests | |
# Triggers the workflow on pull-request or push events | |
on: [pull_request, push] | |
jobs: | |
tests: | |
name: "Test Python ${{ matrix.version }}" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
matrix: | |
version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: "Create conda environment" | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-version: latest | |
activate-environment: testenv | |
python-version: ${{ matrix.version }} | |
channels: conda-forge,defaults | |
show-channel-urls: true | |
- name: "Install dependencies" | |
run: | | |
conda install --yes pytest netCDF4 | |
python -m pip install --no-deps --editable . | |
- name: "Conda info" | |
run: | | |
conda info | |
conda list --explicit | |
- name: "Run tests" | |
run: | | |
pytest --pyargs ugrid_checks |