Skip to content

Build/CI: modernize build/doc/ci #1007

Build/CI: modernize build/doc/ci

Build/CI: modernize build/doc/ci #1007

# This workflow uploads PyLops coverage analysis on Codacy
# For more information see: https://github.com/codacy/codacy-coverage-reporter-action
name: PyLops-coverage
on:
pull_request:
push:
branches: [dev]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install uv with Python
uses: astral-sh/setup-uv@v6
with:
python-version: "3.11"
- name: Install dependencies and pylops
run: uv sync --locked --extra advanced --extra stat --extra deep --all-groups
- name: Coverage with pytest
run: |
uv run coverage run -m pytest
uv run coverage xml
uv run coverage html
- name: Upload HTML coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-html
path: htmlcov/
- name: Run codacy-coverage-reporter
if: github.event_name == 'push'
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml