diff --git a/.github/workflows/on-push-branch-turbo.yml b/.github/workflows/on-push-branch-turbo.yml new file mode 100644 index 00000000000..f3affc5c40d --- /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 '.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 }} +