Skip to content

Commit

Permalink
cicd: Change client tests to use matrix strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
tubarao312 committed Jan 10, 2025
1 parent 11b907b commit 0b2f7cd
Showing 1 changed file with 13 additions and 26 deletions.
39 changes: 13 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
name: app-image
path: /tmp/app-image.tar

test:
name: Run tests
server-tests:
name: Run server tests
needs: build
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -72,14 +72,18 @@ jobs:
-e DATABASE_URL=${DATABASE_URL} \
tacoq-manager cargo test --release --all-features
e2e-test:
name: End-to-end tests
client-tests:
name: Client Tests
needs: [build, server-tests]
runs-on: ubuntu-latest
needs: [build, test]
strategy:
matrix:
sdk: [python] # Add other SDKs here like [python, nodejs, java]

steps:
- uses: actions/checkout@v4

# Common setup steps
- name: Download Docker image
uses: actions/download-artifact@v4
with:
Expand All @@ -89,20 +93,6 @@ jobs:
- name: Load Docker image
run: docker load --input /tmp/app-image.tar

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install Python dependencies
run: |
cd client_sdks/python
uv sync --dev
- name: Start test environment
run: |
cd client_sdks
Expand All @@ -117,14 +107,11 @@ jobs:
cargo sqlx migrate run --source ./server/libs/db-common/migrations
"
- name: Run end-to-end tests
env:
MANAGER_TEST_URL: http://localhost:3000
BROKER_TEST_URL: amqp://user:password@localhost:5672
run: |
cd client_sdks/python
uv run pytest
# Language-specific steps
- name: Run SDK specific workflow
uses: ./.github/actions/sdk-${{ matrix.sdk }}

# Cleanup
- name: Cleanup test environment
if: always()
run: |
Expand Down

0 comments on commit 0b2f7cd

Please sign in to comment.