added .yml to gitattributes (#935) #3
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: Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- v1 | |
paths: | |
- tests/* | |
- hydromt/* | |
- data/* | |
- pyproject.toml | |
- pixi.lock | |
- pixi.toml | |
- .github/workflows/tests.yml | |
pull_request: | |
branches: | |
- main | |
- v1 | |
paths: | |
- tests/* | |
- hydromt/* | |
- data/* | |
- pyproject.toml | |
- pixi.lock | |
- pixi.toml | |
- .github/workflows/tests.yml | |
jobs: | |
build: | |
defaults: | |
run: | |
shell: bash -e -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ['39','310','311'] | |
name: py ${{ matrix.python-version }} (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
concurrency: | |
group: ${{ github.workflow }}-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: prefix-dev/[email protected] | |
with: | |
pixi-version: "v0.21.1" | |
environments: full-py${{ matrix.python-version }} | |
- name: Prepare pixi | |
run: | | |
pixi run --locked -e full-py${{ matrix.python-version }} install-hydromt | |
# Enable tmate debugging of manually-triggered workflows if the input option was provided | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
- name: Test | |
run: | | |
export NUMBA_DISABLE_JIT=1 | |
pixi run --locked -e full-py${{ matrix.python-version }} test-cov | |
# enable for CI debugging | |
# - name: Setup tmate session | |
# if: ${{ failure() }} | |
# uses: mxschmitt/action-tmate@v3 |