Skip to content

chore: Update divine-requests to 0.1.4 and bump version to 0.1.9 #30

chore: Update divine-requests to 0.1.4 and bump version to 0.1.9

chore: Update divine-requests to 0.1.4 and bump version to 0.1.9 #30

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
tags: [ 'v*' ]
pull_request:
branches: [ main, develop ]
workflow_call:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.13"]
include:
# Test on additional Python versions on Ubuntu only
- os: ubuntu-latest
python-version: "3.13"
continue-on-error: ${{ matrix.experimental == true }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run tests with pytest
run: |
pytest -v --cov=thegraph_token_api --cov-report=term-missing --cov-report=xml --cov-report=html
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage reports
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/
- name: Check coverage threshold
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
run: |
coverage report --fail-under=90
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff mypy
- name: Run ruff linter
run: |
ruff check --output-format=github .
continue-on-error: true
- name: Run ruff formatter
run: |
ruff format --check .
continue-on-error: true
- name: Run mypy
run: |
pip install -e .
mypy src/thegraph_token_api --ignore-missing-imports
continue-on-error: true
build:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: 'pip'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: |
python -m build
- name: Check dist contents
run: |
ls -la dist/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist-packages
path: dist/