Skip to content

Commit b123aac

Browse files
ci: add env var, rename images
- latest: core app - test: minimum alpine image w/pytest
1 parent 1c8754a commit b123aac

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

.github/workflows/pytest.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ env:
3838
REDIRECT_URI: ${{ vars.REDIRECT_URI }}
3939
SECRET_KEY: ${{ secrets.SECRET_KEY }}
4040
SELF_ID: ${{ secrets.SELF_ID }}
41+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
4142
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
4243
SIGNING_SECRET: ${{ secrets.SIGNING_SECRET }}
4344
TOKEN_URL: ${{ vars.TOKEN_URL }}
@@ -51,7 +52,7 @@ jobs:
5152
# TODO: avoid hardcoding the image name
5253
services:
5354
server:
54-
image: ghcr.io/pythoninthegrass/meetup-bot
55+
image: ghcr.io/pythoninthegrass/meetup_bot:latest
5556
ports:
5657
- 3000:3000
5758
env:
@@ -76,12 +77,13 @@ jobs:
7677
SELF_ID: ${{ env.SELF_ID }}
7778
SIGNING_KEY_ID: ${{ env.SIGNING_KEY_ID }}
7879
SIGNING_SECRET: ${{ env.SIGNING_SECRET }}
80+
SLACK_WEBHOOK: ${{ env.SLACK_WEBHOOK }}
7981
TOKEN_URL: ${{ env.TOKEN_URL }}
8082
TZ: ${{ env.TZ }}
8183
USER_TOKEN: ${{ env.USER_TOKEN }}
8284

8385
container:
84-
image: python:3.11.9-slim-bullseye
86+
image: ghcr.io/pythoninthegrass/meetup_bot:test
8587

8688
concurrency:
8789
group: ${{ github.workflow }}-${{ github.ref }}
@@ -90,26 +92,6 @@ jobs:
9092
steps:
9193
- uses: actions/checkout@v4
9294

93-
- name: Install system dependencies
94-
run: |
95-
apt-get -qq update \
96-
&& apt-get -qq install \
97-
--no-install-recommends -y \
98-
curl \
99-
gcc \
100-
git \
101-
python3-dev \
102-
&& rm -rf /var/lib/apt/lists/*
103-
104-
- name: Install Python dependencies
105-
run: |
106-
python -m pip install --upgrade pip pytest
107-
python -m pip install -r requirements.txt
108-
109-
# - name: Wait for server to be ready
110-
# run: |
111-
# timeout 60s bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' server:3000/healthz)" != "200" ]]; do sleep 5; done' || false
112-
11395
- name: Run pytest
11496
run: pytest -s
11597
env:

0 commit comments

Comments
 (0)