Skip to content

Commit

Permalink
Added matrix for tests (#193)
Browse files Browse the repository at this point in the history
Added matrix
  • Loading branch information
TreyWW authored Feb 10, 2024
1 parent 3c86463 commit 58a6943
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
name: Backend Tests
on: [ push, pull_request ]

env:
DOCKER_COMPOSE_PATH: ./infrastructure/backend/docker-compose.ci.yml

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.10", "3.11", "3.12" ]
django-version: [ 4, 5 ]

runs-on: ${{ matrix.os }}

env:
DOCKER_COMPOSE_PATH: ./infrastructure/backend/docker-compose.ci.yml

steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

#----------------------------------------------
# install and configure poetry
#----------------------------------------------

- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
Expand All @@ -30,19 +42,22 @@ jobs:
# install docker compose
# setup + configure docker compose
#----------------------------------------------

- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
#----------------------------------------------
# copy docker compose file
#----------------------------------------------
- name: Copy docker compose file
run: cp $DOCKER_COMPOSE_PATH ./docker-compose.yml
run: |
cp $GITHUB_WORKSPACE/$DOCKER_COMPOSE_PATH ./docker-compose.yml
#----------------------------------------------
# run docker compose & tests
#----------------------------------------------

- name: Build and run docker-compose.ci.yml
run: docker compose up -d --wait --wait-timeout 30

Expand Down

0 comments on commit 58a6943

Please sign in to comment.