Skip to content

FIX: lint fixes

FIX: lint fixes #237

Workflow file for this run

name: CI
on:
push:
branches:
- dev
- master
pull_request_target:
branches:
- dev
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# This job installs dependencies, build the website, and pushes it to `gh-pages`
jobs:
build:
name: ${{ matrix.os }}-${{ matrix.python-version }}
if: github.repository == 'MeteoSwiss/pyart'
runs-on: ${{ matrix.os }}-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
os: [macos, ubuntu, windows]
steps:
- uses: actions/checkout@v2
- name: Install boto3
run: pip install boto3
working-directory: ${{ github.workspace }}
- name: Download metranet
run: python get_metranet_lib.py
working-directory: ${{github.workspace}}/pyart/testing/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# Install dependencies
- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: continuous_integration/environment-ci.yml
activate-environment: pyart-dev
cache-downloads: true
python-version: ${{ matrix.python-version }}
- name: Fetch all history for all tags and branches
run: |
git fetch --prune --unshallow
- name: Install PyART
shell: bash -l {0}
run: |
python -m pip install -e . --force-reinstall --no-deps
- name: Run Linting
shell: bash -l {0}
run: |
ruff check .
- name: Run Tests
id: run_tests
shell: bash -l {0}
working-directory: ${{github.workspace}}/tests/
run: |
python -m pytest -v --cov=./ --cov-report=xml
env:
METRANETLIB_PATH: ${{github.workspace}}/pyart/testing/lib/
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v2.1.0
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false