Skip to content

Commit

Permalink
add on push branch workflow for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstarling committed Jan 31, 2024
1 parent 304ec82 commit 66b6a41
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/on-push-branch-turbo.yml
Original file line number Diff line number Diff line change
@@ -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 != "<NONEXISTENT>") | .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 }}

0 comments on commit 66b6a41

Please sign in to comment.