File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed
resources/images/commander Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 25
25
- uses : eifinger/setup-uv@v1
26
26
- run : uvx ruff format . --check
27
27
28
+ build-image :
29
+ needs : [ruff, ruff-format]
30
+ runs-on : ubuntu-latest
31
+ steps :
32
+ - name : Checkout
33
+ uses : actions/checkout@v4
34
+
35
+ - name : Set up Docker Buildx
36
+ uses : docker/setup-buildx-action@v3
37
+
38
+ - name : Build and export
39
+ uses : docker/build-push-action@v5
40
+ with :
41
+ file : resources/images/commander/Dockerfile
42
+ context : .
43
+ tags : bitcoindevproject/warnet-commander:latest
44
+ cache-from : type=gha
45
+ cache-to : type=gha,mode=max
46
+ outputs : type=docker,dest=/tmp/commander.tar
47
+
48
+ - name : Upload artifact
49
+ uses : actions/upload-artifact@v4
50
+ with :
51
+ name : commander
52
+ path : /tmp/commander.tar
53
+
28
54
test :
55
+ needs : [build-image]
29
56
runs-on : ubuntu-latest
30
57
strategy :
31
58
matrix :
44
71
with :
45
72
cpus : max
46
73
memory : 4000m
74
+ - name : Download commander artifact
75
+ uses : actions/download-artifact@v4
76
+ with :
77
+ name : commander
78
+ path : /tmp
47
79
- uses : eifinger/setup-uv@v1
48
80
- name : Install project
49
81
run : uv sync --all-extras --dev
82
+ - name : Install commander image
83
+ run : |
84
+ echo loading commander image into minikube docker
85
+ eval $(minikube -p minikube docker-env)
86
+ docker load --input /tmp/commander.tar
87
+ docker image ls -a
50
88
- name : Run tests
51
89
run : |
52
90
source .venv/bin/activate
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ FROM python:3.12-slim
4
4
# Python dependencies
5
5
# RUN pip install --no-cache-dir prometheus_client
6
6
7
- COPY src/warnet /scenarios/commander.py /
7
+ COPY resources /scenarios/commander.py /
8
8
COPY src/test_framework /test_framework
9
9
10
10
# -u: force the stdout and stderr streams to be unbuffered
You can’t perform that action at this time.
0 commit comments