Skip to content

Bug fix - Reduce log searches (#8792) #2811

Bug fix - Reduce log searches (#8792)

Bug fix - Reduce log searches (#8792) #2811

Workflow file for this run

name: Python SDK
on:
push:
branches: ['main']
pull_request:
types: [opened, synchronize]
paths:
- 'e2e/tests/**'
- 'sdk/highlight-py/**'
- '.github/workflows/python.yml'
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
build:
name: Python SDK
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./sdk/highlight-py
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
- run: poetry install --all-extras
- name: Lint
run: poetry run black --check .
- name: Test
run: poetry run pytest --cov=highlight_io --cov-branch --cov-report xml
- name: Get Cover
if: github.event.pull_request.head.repo.full_name == 'highlight/highlight'
uses: orgoro/coverage@v3
with:
coverageFile: ./sdk/highlight-py/coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: poetry build
- name: Validate PyProject
working-directory: ./e2e/python/setuptools
run: |
python -m pip install -U pip-tools;
python -m piptools compile --upgrade pyproject.toml;
- name: Publish
if: github.ref == 'refs/heads/main'
run: poetry publish -u $PYPI_USERNAME -p $PYPI_PASSWORD --skip-existing
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
e2e:
name: Validate E2E tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./e2e/tests
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
- run: poetry install --all-extras
- name: Lint
run: poetry run black --check .