feat: merge dev into main
#3146
This file contains hidden or 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: App Bridge CI | |
| on: | |
| pull_request: | |
| paths: | |
| - packages/app-bridge/** | |
| # Ensures that only one workflow per branch will run at a time. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| app-bridge-ci: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout default branch | |
| uses: actions/checkout@v4 | |
| with: | |
| # Disabling shallow clone is recommended for improving relevancy of reporting | |
| fetch-depth: 0 | |
| - name: Use pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| run_install: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "pnpm" | |
| - name: Install npm dependencies | |
| run: pnpm i --frozen-lockfile | |
| - name: Typecheck code | |
| run: pnpm --stream --filter {packages/app-bridge} typecheck | |
| - name: Lint code | |
| run: pnpm --stream --filter {packages/app-bridge} lint | |
| - name: Test code | |
| run: pnpm --stream --filter {packages/app-bridge} test:coverage | |
| - name: SonarCloud Scan | |
| uses: sonarsource/sonarqube-scan-action@v6 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| with: | |
| projectBaseDir: ./packages/app-bridge | |
| guideline-blocks-settings-ci: | |
| name: Guideline Blocks Settings CI (for checking compatibility with app-bridge) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout default branch | |
| uses: actions/checkout@v4 | |
| - name: Use pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| run_install: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "pnpm" | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
| ~/.cache/Cypress | |
| key: pnpm-with-cypress-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: pnpm-with-cypress-${{ runner.os }}- | |
| # https://docs.cypress.io/app/get-started/install-cypress#pnpm-configuration | |
| - name: Remove pnpm side effects cache | |
| run: pnpm config set side-effects-cache false --location project | |
| - name: Install npm dependencies | |
| run: pnpm i --frozen-lockfile | |
| - name: Build local deps | |
| run: pnpm build:app-bridge && pnpm build:sidebar-settings | |
| - name: Add app-bridge dependency | |
| run: pnpm add @frontify/app-bridge@workspace:^ --filter {packages/guideline-blocks-settings} | |
| - name: Typecheck code | |
| run: pnpm --stream --filter {packages/guideline-blocks-settings} typecheck | |
| - name: Lint code | |
| run: pnpm --stream --filter {packages/guideline-blocks-settings} lint | |
| - name: Unit Test code | |
| run: pnpm --stream --filter {packages/guideline-blocks-settings} test | |
| - name: Component Tests | |
| run: pnpm test:components |