Bläddra i källkod

Add drone (CI) files

add_tests
demisel 8 månader sedan
förälder
incheckning
510fbd9a96
2 ändrade filer med 31 tillägg och 0 borttagningar
  1. 20
    0
      .drone.yml
  2. 11
    0
      Dockerfile

+ 20
- 0
.drone.yml Visa fil

@@ -0,0 +1,20 @@
1
+kind: pipeline
2
+type: docker
3
+name: run_tests
4
+
5
+volumes:
6
+- name: docker_sock
7
+  host:
8
+    path: /var/run/docker.sock
9
+
10
+steps:
11
+- name: build and test in docker image
12
+  image: docker
13
+  volumes:
14
+  - name: docker_sock
15
+    path: /var/run/docker.sock
16
+  commands:
17
+  - docker build --build-arg STAGE=test -t mytestimage .
18
+  - docker run --network="host" mytestimage python -m pytest test
19
+  when:
20
+    event: [push]

+ 11
- 0
Dockerfile Visa fil

@@ -0,0 +1,11 @@
1
+FROM python:3.11-buster
2
+
3
+
4
+RUN pip install poetry
5
+
6
+COPY pyproject.toml poetry.lock ./
7
+COPY ./million ./million
8
+COPY ./test ./test
9
+
10
+RUN poetry config virtualenvs.create false \
11
+    && poetry install --no-interaction --no-ansi

Laddar…
Avbryt
Spara