Skip to content

Commit

Permalink
Run Rust and JS package tests before publish (#4911)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulkar committed May 15, 2023
1 parent 0f6cd6a commit ea3c451
Showing 1 changed file with 42 additions and 5 deletions.
47 changes: 42 additions & 5 deletions .github/workflows/turborepo-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ jobs:
outputs:
stage-branch: "${{ steps.stage.outputs.STAGE_BRANCH }}"

smoke-test:
go-smoke-test:
name: Go Unit Tests
runs-on: ubuntu-latest
needs: [stage]
steps:
Expand All @@ -75,13 +76,49 @@ jobs:
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
target: ${{ matrix.os.name }}
- name: Run Unit Tests
- name: Run Go Unit Tests
run: turbo run test --filter=cli --color

rust-smoke-test:
name: Rust Unit Tests
runs-on: ubuntu-latest
needs: [stage]
steps:
- name: Show Stage Commit
run: echo "${{ needs.stage.outputs.stage-branch }}"
- uses: actions/checkout@v3
with:
ref: ${{ needs.stage.outputs.stage-branch }}
- name: Build turborepo CLI from source
uses: ./.github/actions/setup-turborepo-environment
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
target: ${{ matrix.os.name }}
- name: Run Rust Unit Tests
run: cargo tr-test

js-smoke-test:
name: JS Package Tests
runs-on: ubuntu-latest
needs: [stage]
steps:
- name: Show Stage Commit
run: echo "${{ needs.stage.outputs.stage-branch }}"
- uses: actions/checkout@v3
with:
ref: ${{ needs.stage.outputs.stage-branch }}
- name: Build turborepo CLI from source
uses: ./.github/actions/setup-turborepo-environment
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
target: ${{ matrix.os.name }}
- name: Run JS Package Tests
run: turbo run check-types test --filter="./packages/*" --filter="\!@vercel/*" --color

build-go-darwin:
name: "Build Go for macOS"
runs-on: macos-latest
needs: [stage, smoke-test]
needs: [stage, go-smoke-test, rust-smoke-test, js-smoke-test]
steps:
- name: Show Stage Commit
run: echo "${{ needs.stage.outputs.stage-branch }}"
Expand Down Expand Up @@ -118,7 +155,7 @@ jobs:
build-go-cross:
name: "Build Go for Windows and Linux"
runs-on: ubuntu-latest
needs: [stage, smoke-test]
needs: [stage, go-smoke-test, rust-smoke-test, js-smoke-test]
container:
image: docker://ghcr.io/vercel/turbo-cross:v1.18.5
steps:
Expand Down Expand Up @@ -165,7 +202,7 @@ jobs:

build-rust:
name: "Build Rust"
needs: [stage, smoke-test]
needs: [stage, go-smoke-test, rust-smoke-test, js-smoke-test]
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit ea3c451

Please sign in to comment.