Skip to content

Merge pull request #185 from axiomhq/bumb-version-0-11-0 #524

Merge pull request #185 from axiomhq/bumb-version-0-11-0

Merge pull request #185 from axiomhq/bumb-version-0-11-0 #524

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- "v*"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v5
- run: uv run ruff check
- run: uv run ruff format --check
test-integration:
name: Test Integration
runs-on: ubuntu-latest
# run integration tests on PRs originating in the upstream repo (non-forks only)
if: github.repository == 'axiomhq/axiom-py' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
needs: lint
strategy:
fail-fast: true
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
environment:
- development
- staging
include:
- environment: development
slug: DEV
- environment: staging
slug: STAGING
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Run tests
run: uv run pytest
env:
AXIOM_URL: ${{ secrets[format('TESTING_{0}_API_URL', matrix.slug)] }}
AXIOM_TOKEN: ${{ secrets[format('TESTING_{0}_TOKEN', matrix.slug)] }}
AXIOM_ORG_ID: ${{ secrets[format('TESTING_{0}_ORG_ID', matrix.slug)] }}
AXIOM_EDGE_URL: ${{ vars[format('TESTING_{0}_EDGE_URL', matrix.slug)] }}
AXIOM_EDGE_TOKEN: ${{ secrets[format('TESTING_{0}_EDGE_TOKEN', matrix.slug)] }}
AXIOM_EDGE_DEPLOYMENT: ${{ vars[format('TESTING_{0}_EDGE_DATASET_DEPLOYMENT', matrix.slug)] }}
AXIOM_DATASET_SUFFIX: ${{ github.run_id }}-${{ matrix.python }}
publish:
name: Publish on PyPi
runs-on: ubuntu-latest
if: github.repository == 'axiomhq/axiom-py' && startsWith(github.ref, 'refs/tags')
needs:
- test-integration
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- run: uv build
- run: uvx twine upload dist/*
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: "${{ secrets.PYPI_TOKEN }}"