Update changesets config #3737
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: CI (build, test, format) | |
# All pull requests, and | |
# Workflow dispatch allows you to run this workflow manually from the Actions tab | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: ${{ matrix.os }} - Node.js v${{ matrix.NodeVersion }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
NodeVersion: [16, 18] | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Fetch base branch | |
if: github.ref_name != 'main' | |
run: git fetch origin ${{ github.base_ref }} | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.NodeVersion }} | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build packages | |
run: pnpm build | |
- name: Lint packages | |
run: pnpm lint:ci | |
- name: Test packages | |
run: pnpm test | |
- name: Verify source code formatting | |
if: github.ref_name != 'main' | |
run: pnpm run format:ci |