Skip to content
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
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Publish

on:
push:
tags:
- '*'

jobs:
publish:
name: "Publish release"
runs-on: "ubuntu-latest"

steps:
- uses: "actions/checkout@v5"
- uses: "actions/setup-python@v6"
with:
python-version-file: ".python-version"
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: "Install dependencies"
run: make install
- name: "Build package & docs"
run: |
make build
- name: "Publish"
run: |
make publish
env:
UV_PUBLISH_USERNAME: __token__
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Test Suite

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"

strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: "actions/checkout@v5"
- uses: "actions/setup-python@v6"
with:
python-version: "${{ matrix.python-version }}"
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: make install
- name: "Run linting checks"
run: make lint
- name: "Run tests"
run: make test
- name: "Upload Coverage"
uses: codecov/codecov-action@v5
with:
files: coverage.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
.pytest_cache/
.ruff_cache/
.coverage
coverage.xml
__pycache__/
*.py[cod]
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.DEFAULT_GOAL := all

.PHONY: install
install:
uv sync

.PHONY: format
format:
ruff check --fix .
Expand All @@ -12,7 +16,16 @@ lint:

.PHONY: test
test:
pytest --cov=aws_lambda_opentelemetry tests -vvv
pytest --cov-report term --cov-report xml:coverage.xml --cov=aws_lambda_opentelemetry tests -vvv

.PHONY: build
build:
uv build


.PHONY: publish
publish:
uv publish

.PHONY: all
all: format lint test
all: format lint test build
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
[build-system]
requires = ["uv_build>=0.9.18,<0.10.0"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-name = "aws_lambda_opentelemetry"
module-root = ""

[project]
name = "aws-lambda-opentelemetry"
version = "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.