File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed
Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [ main, master ]
6+ pull_request :
7+ branches : [ main, master ]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+
16+ - name : Set up Python
17+ uses : actions/setup-python@v5
18+ with :
19+ python-version : " 3.12"
20+
21+ - name : Install dependencies
22+ run : |
23+ python -m pip install --upgrade pip
24+ pip install -e ".[dev]"
25+ # tools (explicit, in case dev extras change)
26+ pip install ruff black pytest
27+
28+ - name : Ruff (lint)
29+ run : ruff check .
30+
31+ - name : Black (format check)
32+ run : black --check .
33+
34+ - name : Pytest
35+ run : pytest -q
36+
37+ docker-build :
38+ runs-on : ubuntu-latest
39+ needs : test
40+ if : github.event_name == 'push' # build only on push, not PR
41+ steps :
42+ - name : Checkout
43+ uses : actions/checkout@v4
44+
45+ - name : Set up Docker Buildx
46+ uses : docker/setup-buildx-action@v3
47+
48+ - name : Build image (no push)
49+ uses : docker/build-push-action@v6
50+ with :
51+ context : .
52+ file : ./Dockerfile
53+ tags : mvtk/sysinfo-cli:ci
54+ load : true
55+
You can’t perform that action at this time.
0 commit comments