Skip to content

Commit 25202c7

Browse files
Chore: docker build step in CI (#4)
1 parent f0f9ed0 commit 25202c7

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ name: CI
33
on: [push, pull_request]
44

55
jobs:
6-
build:
6+
test:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
# Define the specific versions you want to test against
1110
python-version: ["3.10", "3.11", "3.12", "3.13"]
1211
steps:
1312
- uses: actions/checkout@v4
@@ -21,9 +20,7 @@ jobs:
2120
- name: Install Dependencies
2221
run: |
2322
pip install --upgrade pip
24-
# Install pinned dependencies first for reproducibility
2523
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
26-
# Install the project in editable mode + dev tools
2724
pip install -e ".[dev]"
2825
2926
- name: Lint & Format Check (Ruff)
@@ -36,6 +33,24 @@ jobs:
3633
bandit -c pyproject.toml -r .
3734
3835
- name: Run Tests with Coverage
39-
# pytest will read config from pyproject.toml
4036
run: |
41-
pytest
37+
pytest
38+
39+
docker:
40+
needs: test
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Set up Docker Buildx
46+
uses: docker/setup-buildx-action@v3
47+
48+
- name: Build Docker Image
49+
uses: docker/build-push-action@v5
50+
with:
51+
context: .
52+
file: Dockerfile
53+
push: false
54+
tags: project-image:latest
55+
cache-from: type=gha
56+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)