Fixes earlier new functionality (storage nodes, greenhouses) #860
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: ci | |
on: [push] | |
jobs: | |
CI: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.10', '3.11', '3.12'] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'poetry' | |
- name: Install Dependencies | |
run: poetry install | |
- name: Test with pytest | |
run: poetry run pytest -v -m "not slow and not plot" --cov . --cov-report xml:coverage-reports/coverage-hydrolib.xml --junitxml=xunit-reports/xunit-result-hydrolib.xml | |
#- name: Autoformat code if the check fails | |
# if: ${{ (matrix.os == 'ubuntu-latest') && (matrix.python-version == 3.8) }} | |
# run: | | |
# poetry run isort . | |
# poetry run black . | |
# git config --global user.name '${{ github.actor }}' | |
# git config --global user.email '${{ github.actor }}@users.noreply.github.com' | |
# git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | |
# git checkout $GITHUB_HEAD_REF | |
# git commit -am "autoformat: isort & black" && git push || true |