Skip to content

Update dependencies (Jarmo-fix) #140

Update dependencies (Jarmo-fix)

Update dependencies (Jarmo-fix) #140

Workflow file for this run

name: Climate assessment CI-CD
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
linting-and-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dev dependencies
run: |
pip install --upgrade pip wheel
pip install -e .[docs,tests,deploy,linter,notebooks]
# TODO: add `pylint src` and `pydocstyle src` and docs
- name: Formatting and linters
run: |
black --check src scripts tests setup.py --exclude doc/conf.py
isort --check-only --quiet src scripts tests setup.py doc/conf.py
flake8 src scripts tests setup.py doc/conf.py
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install test dependencies
run: |
pip install --upgrade pip wheel
pip install -e .[tests]
- name: Test with pytest
run: |
pytest tests -m "not nightly and not wg3" -r a -vv --cov=climate_assessment --cov-report=xml
# ToDo uncomment as soon as package is published - action only runs on PR, workflow_dispatch is not covered
# - name: Monitor coverage
# if: github.event_name == 'pull_request'
# uses: orgoro/coverage@v2
# with:
# coverageFile: coverage.xml
# token: ${{ secrets.GITHUB_TOKEN }}
# thresholdAll: 0.78
# thresholdNew: 1
# thresholdModified: 0.78
scripts:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install --upgrade pip wheel
pip install -e .