Skip to content

Enabled ERA (eradicate) and PLR (pylint refactor) rulesets and fixed violations #2334

Enabled ERA (eradicate) and PLR (pylint refactor) rulesets and fixed violations

Enabled ERA (eradicate) and PLR (pylint refactor) rulesets and fixed violations #2334

Workflow file for this run

name: Unit test minimum dependencies
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: test-mindeps-${{ github.ref }}
cancel-in-progress: true
jobs:
test-mindeps:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout source
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.12"
- name: Install minimum-compatible dependencies
run: uv sync --resolution lowest-direct --group test
- name: Test
run: uv run pytest tests/unit --verbose --cov=earthaccess --cov=tests --cov-report=term-missing --capture=no --color=yes --tb=native --log-cli-level=INFO --ignore=tests/unit/test_virtual.py
- name: Upload coverage
# Don't upload coverage when using the `act` tool to run the workflow locally
if: ${{ !env.ACT }}
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0