Skip to content

add docs (#5)

add docs (#5) #41

Workflow file for this run

name: Python CI
on:
pull_request:
branches: ["main", "release-*"]
push:
branches: ["main"]
jobs:
code-health:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install black ruff
- name: Run black checks
uses: psf/black@stable
with:
options: "--check --verbose"
src: "sdks/python"
version: "~= 23.0"
checkName: "test_and_lint" # NOTE: this needs to be the same as the job name
- name: Run ruff checks
uses: chartboost/ruff-action@v1
with:
src: "sdks/python"
version: 0.1.14
checkName: "test_and_lint"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pytest:
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
cd sdks/python
pip install poetry
poetry install --all-extras
- name: Generate Report
run: |
cd sdks/python
poetry run coverage run -m pytest
poetry run coverage xml -o coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: sdks/python/coverage.xml
name: python-${{ matrix.python-version }}