Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Test multiple Python versions through Docker build arg #24

Merged
merged 4 commits into from
Jan 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ on:

jobs:
test:

strategy:
fail-fast: false
matrix:
version: ['3.8', '3.9', '3.10', '3.11']

runs-on: ubuntu-20.04
env:
COMPOSE_FILE: .ci/docker-compose.yml
Expand All @@ -20,7 +26,7 @@ jobs:
uses: actions/checkout@v3

- name: Build the images
run: DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -f base.yml -f .ci/docker-compose.yml build
run: DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -f base.yml -f .ci/docker-compose.yml build --build-arg PYTHON_VERSION=${{ matrix.version }}

- name: Run unit tests
run: make utest
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM python:3.8
ARG PYTHON_VERSION=3.8
FROM python:$PYTHON_VERSION

EXPOSE 8000

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ fastapi==0.86.0
mmh3==3.0.0
pika==1.2.0
psycopg2-binary==2.9.5
pydantic==1.8.2
pydantic==1.10.4
python-dotenv==0.19.0
requests==2.27.1
sqlalchemy==1.4.31
uvicorn==0.17.1
uvicorn==0.17.1