Update README.md (#1431) #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: Toolbar / Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- "pnpm-lock.yaml" | |
- "components/toolbar/**" | |
defaults: | |
run: | |
working-directory: components/toolbar | |
jobs: | |
verify_formatting: | |
name: Check formatting & linting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: pnpm | |
- run: make deps | |
- run: make check_styleguide | |
check_types: | |
name: Check types | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: pnpm | |
- run: make deps | |
- run: make check_types | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18, 20, 22] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: pnpm | |
- name: Install | |
run: make deps | |
- name: Run tests | |
run: make tests | |
maybe_publish: | |
runs-on: ubuntu-latest | |
needs: [test, check_types, verify_formatting] | |
if: ${{ github.ref_name == 'main' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: pnpm | |
- run: make deps | |
- run: pnpm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}" | |
- run: make publish-canary |