Feature/update to python3.12 #199
Workflow file for this run
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: Climate assessment CI-CD | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install poetry | |
shell: bash | |
run: | | |
pipx install poetry | |
which poetry | |
poetry --version # Check poetry installation | |
- name: Set up Python | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: poetry | |
- name: Set up Poetry environment | |
shell: bash | |
run: | | |
poetry config virtualenvs.create true | |
poetry config virtualenvs.in-project true | |
- name: Install dev dependencies | |
shell: bash | |
run: | | |
poetry install --no-interaction --no-root --all-extras --only 'main,dev' | |
- name: Formatting and linters | |
run: | | |
poetry run pre-commit run --all-files | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python_version: ["3.11", "3.12"] | |
fail-fast: false | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install poetry | |
shell: bash | |
run: | | |
pipx install poetry | |
which poetry | |
poetry --version # Check poetry installation | |
- name: Set up Python ${{ matrix.python_version }} | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python_version }} | |
cache: poetry | |
- name: Set up Poetry environment | |
shell: bash | |
run: | | |
poetry config virtualenvs.create true | |
poetry config virtualenvs.in-project true | |
- name: Install test dependencies and package | |
shell: bash | |
run: | | |
poetry install --no-interaction --all-extras --only 'main,tests,dev' | |
- name: Test with pytest | |
run: | | |
poetry run pytest tests -m "not nightly and not wg3" -r a -vv --cov=climate_assessment --cov-report=xml |