Skip to content

Commit

Permalink
Add matrix to test different major version of databases
Browse files Browse the repository at this point in the history
  • Loading branch information
burakince committed Dec 13, 2024
1 parent 5b20973 commit 0ab0863
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ jobs:
integrationtest:
runs-on: ubuntu-latest

strategy:
matrix:
database-combo:
- { postgres: "15", mysql: "8.0" }
- { postgres: "16", mysql: "8.4" }
- { postgres: "17", mysql: "9.1" }

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -73,10 +80,23 @@ jobs:
- name: Install library
run: poetry install --no-interaction

#----------------------------------------------
# Overwrite .env file to test different version of databases
#----------------------------------------------
- name: Set up .env file
run: |
echo "POSTGRES_VERSION=${{ matrix.database-combo.postgres }}" > .env
echo "MYSQL_VERSION=${{ matrix.database-combo.mysql }}" >> .env
echo "MINIO_VERSION=RELEASE.2024-11-07T00-52-20Z" >> .env
echo "FAKE_GCS_SERVER_VERSION=1.50.2" >> .env
#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run tests
env:
POSTGRES_VERSION: ${{ matrix.database-combo.postgres }}
MYSQL_VERSION: ${{ matrix.database-combo.mysql }}
run: |
source .venv/bin/activate
poetry run pytest
Expand Down

0 comments on commit 0ab0863

Please sign in to comment.