Skip to content

Commit 74a323e

Browse files
authored
github actions (#1)
1 parent a0f6202 commit 74a323e

6 files changed

Lines changed: 93 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Publish
3+
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
publish:
11+
name: "Publish release"
12+
runs-on: "ubuntu-latest"
13+
14+
steps:
15+
- uses: "actions/checkout@v5"
16+
- uses: "actions/setup-python@v6"
17+
with:
18+
python-version-file: ".python-version"
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v7
21+
- name: "Install dependencies"
22+
run: make install
23+
- name: "Build package & docs"
24+
run: |
25+
make build
26+
- name: "Publish"
27+
run: |
28+
make publish
29+
env:
30+
UV_PUBLISH_USERNAME: __token__
31+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}

.github/workflows/test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Test Suite
3+
4+
on:
5+
push:
6+
branches: ["main"]
7+
pull_request:
8+
branches: ["main"]
9+
10+
jobs:
11+
tests:
12+
name: "Python ${{ matrix.python-version }}"
13+
runs-on: "ubuntu-latest"
14+
15+
strategy:
16+
matrix:
17+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
18+
19+
steps:
20+
- uses: "actions/checkout@v5"
21+
- uses: "actions/setup-python@v6"
22+
with:
23+
python-version: "${{ matrix.python-version }}"
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v5
26+
with:
27+
python-version: "${{ matrix.python-version }}"
28+
- name: "Install dependencies"
29+
run: make install
30+
- name: "Run linting checks"
31+
run: make lint
32+
- name: "Run tests"
33+
run: make test
34+
- name: "Upload Coverage"
35+
uses: codecov/codecov-action@v5
36+
with:
37+
files: coverage.xml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
.pytest_cache/
44
.ruff_cache/
55
.coverage
6+
coverage.xml
67
__pycache__/
78
*.py[cod]

Makefile

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
.DEFAULT_GOAL := all
22

3+
.PHONY: install
4+
install:
5+
uv sync
6+
37
.PHONY: format
48
format:
59
ruff check --fix .
@@ -12,7 +16,16 @@ lint:
1216

1317
.PHONY: test
1418
test:
15-
pytest --cov=aws_lambda_opentelemetry tests -vvv
19+
pytest --cov-report term --cov-report xml:coverage.xml --cov=aws_lambda_opentelemetry tests -vvv
20+
21+
.PHONY: build
22+
build:
23+
uv build
24+
25+
26+
.PHONY: publish
27+
publish:
28+
uv publish
1629

1730
.PHONY: all
18-
all: format lint test
31+
all: format lint test build

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
[build-system]
2+
requires = ["uv_build>=0.9.18,<0.10.0"]
3+
build-backend = "uv_build"
4+
5+
[tool.uv.build-backend]
6+
module-name = "aws_lambda_opentelemetry"
7+
module-root = ""
8+
19
[project]
210
name = "aws-lambda-opentelemetry"
311
version = "0.0.0"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)