Version Packages (#14125) #4522
  
    
      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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - next | |
| pull_request: | |
| jobs: | |
| build: | |
| name: 'Lint & type check' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
| with: | |
| fetch-depth: 2 | |
| - name: Free up space on GitHub image | |
| run: | | |
| # Based on the official advice: | |
| # https://github.com/actions/virtual-environments/issues/2840#issuecomment-790492173 | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf "/usr/local/share/boost" | |
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 | |
| - name: Setup Node from .nvmrc | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: pnpm | |
| - name: Restore cache | |
| uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3 | |
| with: | |
| path: | | |
| **/.eslintcache | |
| **/.turbo | |
| node_modules/.cache/turbo | |
| polaris.shopify.com/.next/cache | |
| key: ${{ runner.os }}-lint-v3-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-lint-v3- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Type check | |
| run: pnpm type-check |