Refactor Accordion [Composition pattern, optimisations, contributing standards] #3865
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: Optimized build, lint, test all packages | |
run: pnpm turbo build lint test | |
- name: List mismatched dependencies | |
run: pnpm run lint:versions | |
- name: Verify source code formatting | |
if: github.ref_name != 'main' | |
run: pnpm run format:ci |