update: update build flow #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: | |
push: | |
branches: [master, dev] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
if: github.event_name == 'pull_request' | |
timeout-minutes: 10 | |
# env: | |
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
# TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/setup | |
- run: pnpm turbo --filter build | |
test: | |
timeout-minutes: 10 | |
# env: | |
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
# TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/setup | |
- run: pnpm turbo --filter build | |
- run: pnpm test | |
- uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
# only use token if not a fork PR | |
token: ${{ github.event.pull_request.head.repo.fork == false && secrets.CODECOV_TOKEN || '' }} |