Skip to content
This repository was archived by the owner on Jun 2, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ jobs:
version: '${{ github.run_number }}.0.0'
repository: testpypi
secrets:
twine_username: __token__
twine_password: ${{ secrets.TESTPYPI_TOKEN }}
twine_token: ${{ secrets.TESTPYPI_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/publish-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
# so easy to forget bumping the version to match the tag, just override it!
version: ${{ github.ref_name }}
secrets:
twine_username: __token__
twine_password: ${{ secrets.PYPI_TOKEN }}
twine_token: ${{ secrets.PYPI_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
34 changes: 23 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,31 @@ on:
default: pypi
type: string
secrets:
twine_username:
twine_token:
required: true
twine_password:
CODECOV_TOKEN:
required: false
workflow_dispatch:
inputs:
version:
description: 'Version to publish (for example: 1.2.3)'
type: string
required: true
repository:
description: 'Package index repository'
type: choice
options:
- pypi
- testpypi
default: pypi

run-name: publish to ${{ inputs.repository }}

jobs:
test:
uses: ./.github/workflows/test.yml
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

publish:
name: publish to ${{ inputs.repository }}
Expand All @@ -36,21 +51,18 @@ jobs:

- name: Install dependencies
run: |
pip install pipenv
pipenv requirements --dev > reqs.txt
pip install -r reqs.txt
pip install uv
uv sync --dev
- name: force right version
run: |
.github/change_version.py --set '${{ inputs.version }}'
- name: Build
run: pyproject-build
run: uv run pyproject-build
- name: Publish
env:
TWINE_USERNAME: ${{ secrets.twine_username }}
TWINE_PASSWORD: ${{ secrets.twine_password }}
run: |
pyproject-build
twine upload --repository ${{ inputs.repository }} dist/*
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.twine_token }}
run: uv run twine upload --verbose --repository ${{ inputs.repository }} dist/*
- name: highlight
run: |
INDEX=""
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: 🧪 tests

on:
workflow_call:
secrets:
CODECOV_TOKEN:
required: false
push:
branches-ignore:
# these are already tested by publish-dev
Expand All @@ -23,9 +26,8 @@ jobs:

- name: Install dependencies
run: |
pip install pipenv
pipenv requirements --dev > reqs.txt
pip install -r reqs.txt
pip install uv
uv sync --dev

- name: Lint check
run: |
Expand All @@ -47,20 +49,18 @@ jobs:

- name: Install dependencies
run: |
pip install pipenv
pipenv requirements --dev > reqs.txt
pip install -r reqs.txt
pip install uv
uv sync --dev

- name: Run unit tests
run: |
make test

- name: Upload results to Codecov
uses: codecov/codecov-action@v4

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
report_type: test_results

integration-test:
runs-on: ubuntu-latest
Expand All @@ -75,9 +75,8 @@ jobs:

- name: Install dependencies
run: |
pip install pipenv
pipenv requirements --dev > reqs.txt
pip install -r reqs.txt
pip install uv
uv sync --dev

- name: Run e2e tests
run: |
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Build

This project uses a `Pipfile`, so set up the virtualenv by running
This project uses `uv`, so set up the virtualenv by running

```
pipenv install --dev
uv sync --dev
```

Use `make test` to make sure all tests pass before pushing.
Expand All @@ -12,4 +12,4 @@ Use `make lint` to make sure lint check passes before pushing.

## Guidelines

...
...
20 changes: 9 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
lint:
ruff format
ruff check --fix
pyproject-pipenv --fix
uv run ruff format
uv run ruff check --fix

lint-check:
ruff format --diff
ruff check
pyproject-pipenv
uv run ruff format --diff
uv run ruff check

test:
if [ -n "$(GITHUB_RUN_ID)" ]; then \
python -m pytest --cov --cov-report=xml --junitxml=junit.xml -o junit_family=legacy; \
uv run pytest --cov --cov-report=xml --junitxml=junit.xml -o junit_family=legacy; \
else \
python -m pytest --cov; \
uv run pytest --cov; \
fi

test-e2e: export DD_INTEGRATION_TESTS=1
test-e2e:
python -m pytest tests/integration
uv run pytest tests/integration

testpub:
rm -fr dist
pyproject-build
twine upload --repository testpypi dist/*
uv run pyproject-build
uv run twine upload --repository testpypi dist/*

schema:
./support/openapi/fetch_openapi.py
Expand Down
19 changes: 0 additions & 19 deletions Pipfile

This file was deleted.

Loading