Skip to content

Commit e344965

Browse files
committed
feat: update
1 parent 062040c commit e344965

8 files changed

Lines changed: 43 additions & 149 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
FROM python:3.14
1+
FROM python:3.14.6-trixie
2+
COPY --from=ghcr.io/astral-sh/uv:0.11.21 /uv /uvx /bin/
23

34
ENV PYTHONUNBUFFERED 1
4-
5-
# Install Python Deps
6-
RUN pip install --upgrade pip pre-commit uv

.devcontainer/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pre-commit==4.6.0
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
docker pull python:3.14
1+
cd .devcontainer
2+
docker compose pull
3+
cd -

.devcontainer/scripts/post-create.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ echo "source /usr/share/bash-completion/completions/git" >> ~/.bashrc
33
echo 'export GPG_TTY="$( tty )"' >> ~/.bashrc
44

55
# install deps
6+
pip install --upgrade pip
7+
pip install -r .devcontainer/requirements.txt # global deps
8+
69
pre-commit install

.github/workflows/continuous_delivery.yaml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212

1313
jobs:
1414
build:
15-
environment: cd-env
15+
environment: release
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
@@ -24,18 +24,14 @@ jobs:
2424
id-token: write
2525

2626
steps:
27-
- uses: actions/checkout@v6
28-
29-
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v6
27+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
3130
with:
3231
python-version: ${{ matrix.python-version }}
3332

3433
- name: Install dependencies
35-
run: |
36-
python -m pip install --upgrade pip
37-
pip install uv
38-
uv sync
34+
run: uv sync --all-groups
3935

4036
- name: Build and publish Package
4137
env:
@@ -48,15 +44,15 @@ jobs:
4844
4945
# Build and push Docker image
5046
- name: Log in to the Container registry
51-
uses: docker/login-action@v5
47+
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
5248
with:
5349
registry: ${{ env.REGISTRY }}
5450
username: ${{ github.actor }}
5551
password: ${{ secrets.GITHUB_TOKEN }}
5652

5753
- name: Docker metadata
5854
id: meta
59-
uses: docker/metadata-action@v6
55+
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0
6056
with:
6157
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6258
tags: |
@@ -65,15 +61,15 @@ jobs:
6561
6662
- name: Build and push Docker image
6763
id: push
68-
uses: docker/build-push-action@v7
64+
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
6965
with:
7066
context: .
7167
push: true
7268
tags: ${{ steps.meta.outputs.tags }}
7369
labels: ${{ steps.meta.outputs.labels }}
7470

7571
- name: Generate artifact attestation
76-
uses: actions/attest-build-provenance@v4
72+
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
7773
with:
7874
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
7975
subject-digest: ${{ steps.push.outputs.digest }}

.github/workflows/continuous_integration.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,46 @@
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

44
name: Continuous Integration (Python)
5-
on: push
5+
on:
6+
push:
7+
branches:
8+
- main
9+
10+
pull_request:
11+
types: [opened, synchronize, reopened]
12+
branches:
13+
- main
614

715
jobs:
816
build:
9-
# environment: project_name
1017
runs-on: ubuntu-latest
1118
strategy:
1219
matrix:
1320
python-version: ["3.14"] # Add more Python versions to test here
1421

1522
steps:
16-
- uses: actions/checkout@v6
17-
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v6
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
23+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2324
- name: Install uv
24-
uses: astral-sh/setup-uv@v7
25+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
2526
with:
2627
python-version: ${{ matrix.python-version }}
2728

2829
- name: Install dependencies
29-
run: |
30-
uv sync --all-groups --all-extras
30+
run: uv sync --all-groups
3131

3232
- name: Lint with ruff
3333
run: uv run ruff check . --output-format=github
34+
3435
- name: Check types with ty
3536
run: uv run ty check . --output-format=github
37+
3638
- name: Test with pytest
37-
run: uv run pytest .
39+
run: uv run pytest
3840

39-
# - name: Coveralls
40-
# env:
41-
# github-token: ${{ secrets.GITHUB_TOKEN }}
42-
# uses: coverallsapp/github-action@v2.3.7
41+
- name: Upload coverage report
42+
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
43+
uses: actions/upload-code-coverage@abb5995db9e0199b0e2bb9dbd136fce4cb1ec4d3 # v1.3.0
44+
with:
45+
file: coverage.xml
46+
language: Python
47+
label: code-coverage/pytest

CLAUDE.md

Lines changed: 0 additions & 111 deletions
This file was deleted.

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Build stage
2-
FROM python:3.14-slim-bookworm AS builder
3-
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
2+
FROM python:3.14.6-slim-trixie AS builder
3+
COPY --from=ghcr.io/astral-sh/uv:0.11.21 /uv /uvx /bin/
44

55
WORKDIR /app
66

@@ -10,7 +10,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
1010
uv sync --locked --no-editable --no-default-groups
1111

1212

13-
FROM python:3.14-slim-bookworm AS final
13+
FROM python:3.14.6-slim-trixie AS final
1414

1515
RUN useradd --user-group --system --create-home --no-log-init app \
1616
&& mkdir -p /app \

0 commit comments

Comments
 (0)