From 66b6a417189d59ca5581845292c0b9490a5632c4 Mon Sep 17 00:00:00 2001 From: Piotr Szpak Date: Wed, 31 Jan 2024 15:37:55 +0000 Subject: [PATCH] add on push branch workflow for testing --- .github/workflows/on-push-branch-turbo.yml | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/on-push-branch-turbo.yml diff --git a/.github/workflows/on-push-branch-turbo.yml b/.github/workflows/on-push-branch-turbo.yml new file mode 100644 index 00000000000..b5acad332af --- /dev/null +++ b/.github/workflows/on-push-branch-turbo.yml @@ -0,0 +1,38 @@ +name: Pipeline branch - test turborepo + +on: + push: + branches: + - feat/asap-285-use-turbo-for-tests + +jobs: + setup-turbo: + runs-on: ubuntu-latest + environment: Branch + outputs: + packages: ${{ steps.setup.outputs.packages }} + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Re-Build + uses: ./.github/actions/build-rebuild + - name: Setup turborepo test pipeline + id: setup + run: | + DRYRUN=$(yarn turbo test --only --dry-run=json --continue) + PACKAGES=$(echo $DRYRUN | jq -c '.tasks[] | select(.command != "") | .package') + echo $PACKAGES + echo 'packages=$PACKAGES' >> "$GITHUB_OUTPUT" + test-turbo: + needs: setup-turbo + runs-on: ubuntu-latest + strategy: + matrix: + package: ${{ fromJson(needs.setup-turbo.outputs.packages) }} + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Test ${{ matrix.package }} + run: | + echo ${{ matrix.package }} +