Skip to content

Commit 52780f6

Browse files
move test to ci job
1 parent 102e1b8 commit 52780f6

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

.github/workflows/build.yaml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,36 @@ jobs:
1313
steps:
1414
- name: Install Docker Buildx
1515
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
2118
- name: Build Docker image
2219
working-directory: ./app
2320
run: |
2421
docker buildx build \
2522
--platform linux/amd64,linux/arm64 \
2623
.
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+
34+
- name: Checkout Repo
35+
uses: actions/checkout@v4
36+
37+
- name: Set up cache for Poetry dependencies
38+
uses: actions/cache@v4
39+
with:
40+
path: ~/.cache/pypoetry
41+
key: poetry-${{ hashFiles('app/poetry.lock') }}
42+
43+
- name: Install Python dependencies with Poetry
44+
working-directory: ./app
45+
run: poetry install --no-interaction --no-root
46+
47+
- name: Run intercom test
48+
run: python app/test_intercom.py

app/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ COPY . /app
3737
# Expose port 5050 for the Flask application
3838
EXPOSE 5050
3939

40-
# Run test file
41-
RUN python test_intercom.py
42-
4340
# Define environment variable for Flask
4441
ENV FLASK_APP=app.py
4542

0 commit comments

Comments
 (0)