Skip to content

Commit f3fb4d7

Browse files
committed
fix: docker build
1 parent 0d7c7b2 commit f3fb4d7

3 files changed

Lines changed: 34 additions & 10 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ jobs:
1616

1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v6
20+
with:
21+
submodules: recursive
2022

2123
- name: Set up Docker Buildx
2224
uses: docker/setup-buildx-action@v3
2325

2426
- name: Build Docker image
25-
uses: docker/build-push-action@v5
27+
uses: docker/build-push-action@v6
2628
with:
2729
context: .
2830
file: ./Dockerfile
@@ -32,7 +34,18 @@ jobs:
3234
cache-to: type=gha,mode=max,scope=buildkit-python-mapnik
3335
load: true
3436

37+
- name: Cache uv virtual environment (for container tests)
38+
uses: actions/cache@v5
39+
with:
40+
path: .venv
41+
key: venv-docker-${{ runner.os }}-${{ hashFiles('uv.lock', 'pyproject.toml', 'setup.py') }}
42+
restore-keys: |
43+
venv-docker-${{ runner.os }}-
44+
3545
- name: Run tests in Docker container
3646
run: |
37-
docker run --rm -v ${{ github.workspace }}/test:/test python-mapnik:latest \
38-
sh -c "uv pip install pytest pytest-cov && uv run pytest /test/python_tests -v"
47+
docker run --rm \
48+
-v ${{ github.workspace }}:/workspace \
49+
-w /workspace/test/python_tests \
50+
python-mapnik:latest \
51+
sh -c "uv sync --extra test && uv run pytest . -v"

.github/workflows/release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ jobs:
2929

3030
steps:
3131
- name: Checkout code
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v6
33+
with:
34+
submodules: recursive
3335

34-
- name: Cache uv downloads/builds
36+
- name: Cache uv downloads
3537
uses: actions/cache@v5
3638
with:
3739
path: /github/home/.cache/uv
@@ -80,7 +82,7 @@ jobs:
8082
retention-days: 7
8183

8284
- name: Create GitHub Release
83-
uses: softprops/action-gh-release@v1
85+
uses: softprops/action-gh-release@v2
8486
if: github.event_name == 'push'
8587
with:
8688
tag_name: ${{ steps.version.outputs.version }}

.github/workflows/test.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,27 @@ jobs:
2323

2424
steps:
2525
- name: Checkout code
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@v6
2727
with:
2828
submodules: recursive
2929

30-
- name: Cache uv downloads/builds
30+
- name: Cache uv downloads
3131
uses: actions/cache@v5
3232
with:
3333
path: /github/home/.cache/uv
3434
key: uvcache-${{ runner.os }}-${{ hashFiles('uv.lock', 'pyproject.toml') }}
3535
restore-keys: |
3636
uvcache-${{ runner.os }}-
3737
38+
- name: Cache uv virtual environment and build artifacts
39+
uses: actions/cache@v5
40+
with:
41+
path: .venv
42+
key: venv-${{ runner.os }}-${{ hashFiles('uv.lock', 'pyproject.toml', 'setup.py') }}-${{ hashFiles('src/**/*.cpp', 'src/**/*.hpp', 'packaging/**/*.py') }}
43+
restore-keys: |
44+
venv-${{ runner.os }}-${{ hashFiles('uv.lock', 'pyproject.toml', 'setup.py') }}-
45+
venv-${{ runner.os }}-
46+
3847
- name: Add Debian sid repository
3948
run: |
4049
echo "deb http://deb.debian.org/debian sid main" >> /etc/apt/sources.list.d/sid.list
@@ -93,7 +102,7 @@ jobs:
93102
comment_mode: off
94103

95104
- name: Upload coverage to Codecov
96-
uses: codecov/codecov-action@v4
105+
uses: codecov/codecov-action@v5
97106
if: always()
98107
with:
99108
files: ./coverage.xml

0 commit comments

Comments
 (0)