File tree Expand file tree Collapse file tree 2 files changed +31
-8
lines changed Expand file tree Collapse file tree 2 files changed +31
-8
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,40 @@ jobs:
13
13
steps :
14
14
- name : Install Docker Buildx
15
15
uses : docker/setup-buildx-action@v2
16
- - name : Set up Python
17
- uses : actions/setup-python@v5
18
- with :
19
- python-version : ' 3.11'
20
-
16
+ - name : Checkout Repo
17
+ uses : actions/checkout@v4
21
18
- name : Build Docker image
22
19
working-directory : ./app
23
20
run : |
24
21
docker buildx build \
25
22
--platform linux/amd64,linux/arm64 \
26
23
.
24
+
25
+ test :
26
+ runs-on : ubuntu-latest
27
+ permissions :
28
+ contents : read
29
+
30
+ steps :
31
+ - name : Install poetry
32
+ run : pipx install poetry
33
+ - name : Set up Python
34
+ uses : actions/setup-python@v5
35
+ with :
36
+ python-version : ' 3.11'
37
+
38
+ - name : Checkout Repo
39
+ uses : actions/checkout@v4
40
+
41
+ - name : Set up cache for Poetry dependencies
42
+ uses : actions/cache@v4
43
+ with :
44
+ path : ~/.cache/pypoetry
45
+ key : poetry-${{ hashFiles('app/poetry.lock') }}
46
+
47
+ - name : Install Python dependencies with Poetry
48
+ working-directory : ./app
49
+ run : poetry install --no-interaction --no-root
50
+
51
+ - name : Run intercom test
52
+ run : python app/test_intercom.py
Original file line number Diff line number Diff line change @@ -37,9 +37,6 @@ COPY . /app
37
37
# Expose port 5050 for the Flask application
38
38
EXPOSE 5050
39
39
40
- # Run test file
41
- RUN python test_intercom.py
42
-
43
40
# Define environment variable for Flask
44
41
ENV FLASK_APP=app.py
45
42
You can’t perform that action at this time.
0 commit comments