From 39c55240ad097500733bb2967b41c90c2c7c2b68 Mon Sep 17 00:00:00 2001 From: "Thomas J. Zajac" Date: Mon, 15 Apr 2024 15:29:42 +0000 Subject: [PATCH] Fixed monorepo matrix --- .github/workflows/monorepo_tests.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/monorepo_tests.yaml b/.github/workflows/monorepo_tests.yaml index 21179a50..771e85d9 100644 --- a/.github/workflows/monorepo_tests.yaml +++ b/.github/workflows/monorepo_tests.yaml @@ -15,21 +15,24 @@ jobs: - id: set-matrix run: | - RESULTS=$(python3 ./scripts/affected_services.py) - echo "affected=$(jq -cn --argjson services \ - "$RESULTS" '{service: $services}')" >> $GITHUB_OUTPUT + echo "affected=$(python3 ./scripts/affected_services.py)" >> $GITHUB_OUTPUT test: needs: check-changes runs-on: ubuntu-latest strategy: - matrix: ${{ fromJson(needs.check-changes.outputs.matrix) }} + matrix: + service: ${{ fromJson(needs.check-changes.outputs.matrix) }} steps: - uses: actions/checkout@v3 + with: + sparse-checkout: | + .github + .lock + .services/${{matrix.service}} - name: setup - run: pip install --no-deps -r ./lock/requirements-dev.txt + run: pip install --no-deps -r ./lock/requirements-dev.txt && pip install --upgrade ./services/${{matrix.service}}/ - - run: echo ${{matrix.service}} - - name: run-tests + - name: run tests for specific service run: pytest ./services/${{matrix.service}}/