fix: sort-package-json ^2.0.0 #1057
Workflow file for this run
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 | |
on: | |
pull_request: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
env: | |
CI: true | |
dist-cache-paths: | | |
packages/*/dist | |
packages/*/*/index.d.ts | |
packages/*/*/package.json | |
jobs: | |
skip_check: | |
name: Check concurrent runs | |
runs-on: ubuntu-latest | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- uses: fkirc/skip-duplicate-actions@v5 | |
id: skip_check | |
with: | |
concurrent_skipping: same_content_newer | |
# We want to skip only concurrent runs. Subsequent runs/retries should be allowed. | |
skip_after_successful_duplicate: false | |
build: | |
name: Build | |
needs: skip_check | |
if: needs.skip_check.outputs.should_skip != 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout & Install | |
uses: seek-oss/crackle/.github/actions/init@master | |
- name: Self build | |
run: pnpm build:ci | |
- name: Save build cache | |
uses: actions/cache/save@v4 | |
with: | |
path: ${{ env.dist-cache-paths }} | |
key: build-${{ github.sha }} | |
enableCrossOsArchive: true | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Checkout & Install | |
uses: seek-oss/crackle/.github/actions/init@master | |
- name: Restore build cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: ${{ env.dist-cache-paths }} | |
key: build-${{ github.sha }} | |
enableCrossOsArchive: true | |
- name: Run All Linters | |
run: pnpm lint | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Checkout & Install | |
uses: seek-oss/crackle/.github/actions/init@master | |
- name: Restore build cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: ${{ env.dist-cache-paths }} | |
key: build-${{ github.sha }} | |
enableCrossOsArchive: true | |
- name: Cache browsers | |
id: browsers-cache | |
uses: actions/cache@v4 | |
with: | |
path: /home/runner/.cache/ms-playwright | |
key: browsers-${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml') }} | |
- name: Install browsers | |
if: steps.browsers-cache.outputs.cache-hit != 'true' | |
run: pnpm playwright install chromium | |
- name: Test | |
run: pnpm test | |
test-braid: | |
name: Test with Braid | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Checkout & Install | |
uses: seek-oss/crackle/.github/actions/init@master | |
- name: Restore build cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: ${{ env.dist-cache-paths }} | |
key: build-${{ github.sha }} | |
enableCrossOsArchive: true | |
# First, clone the Braid repo so we have its lockfile | |
# We then cache/restore based on our lockfile *and* Braid's lockfile | |
# Then we install dependencies in Braid and run the test | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Clone Braid repo | |
run: pnpm fixtures:braid --clone --absorb | |
- name: Cache Braid dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: braid-${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml', './fixtures/braid-design-system/pnpm-lock.yaml') }} | |
- name: Install & Test | |
run: | | |
pnpm set verify-store-integrity false | |
pnpm test:braid |