Skip to content

JSON RPC

JSON RPC #175

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: CI
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
permissions:
contents: read
jobs:
testing:
name: Testing (${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Set up ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e . -r requirements_dev.txt
- name: Run ruff
run: |
ruff check .
- name: Run tests
run: |
pytest
mv .coverage .coverage.${{ matrix.python-version }}
- name: Run spell check
run: |
typos src/ tests/ examples/ docs/ --config _typos.toml
- name: Build doc
run: |
pip install -r requirements_doc.txt
sphinx-build -M html docs docs-build -W
- name: Run zizmor
run: zizmor .github
- name: Store coverage file
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
if: ${{ github.event_name == 'pull_request' }}
with:
name: coverage-${{ matrix.python-version }}
path: .coverage.${{ matrix.python-version }}
if-no-files-found: error
include-hidden-files: true
coverage:
name: Coverage
runs-on: ubuntu-latest
needs: testing
permissions:
pull-requests: write
contents: write
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
with:
persist-credentials: false
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
id: download
with:
pattern: coverage-*
merge-multiple: true
- name: Coverage comment
id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@e623398c19eb3853a5572d4a516e10b15b5cefbc
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_COVERAGE_FILES: true
MINIMUM_GREEN: 90
- name: Store Pull Request comment to be posted (for external pr)
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
with:
name: python-coverage-comment-action
path: python-coverage-comment-action.txt