Merge pull request #2867 from Shopify/dependabot/npm_and_yarn/mongodb… #22425
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
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| name: CI | |
| env: | |
| DISABLE_V8_COMPILE_CACHE: 1 | |
| # Cancel outdated CI runs when new commits are pushed | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Only needs to run on one version of node | |
| # Doesn't need to build anything | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1 | |
| with: | |
| cache: 'pnpm' | |
| node-version: 20 | |
| - name: Install | |
| run: pnpm install --frozen-lockfile | |
| - name: Run linting | |
| run: pnpm lint | |
| # Test API Client packages | |
| test-api-clients: | |
| name: Test_ApiClients_Node_${{ matrix.version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: [20.10.0, 22, 24] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1 | |
| with: | |
| cache: 'pnpm' | |
| node-version: ${{ matrix.version }} | |
| - name: Install | |
| run: pnpm install --frozen-lockfile | |
| - name: Build dependencies for API client packages | |
| run: pnpm build --filter='./packages/api-clients/*...' | |
| - name: Run API client tests | |
| run: pnpm test:ci --filter='./packages/api-clients/*' | |
| # Test all app-packages together | |
| test-app-packages: | |
| name: Test_App_Packages_Node_${{ matrix.version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: [20.10.0, 22, 24] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1 | |
| with: | |
| cache: 'pnpm' | |
| node-version: ${{ matrix.version }} | |
| - name: Install | |
| run: pnpm install --frozen-lockfile | |
| - name: Build dependencies for all app packages | |
| run: pnpm build --filter='./packages/apps/shopify-api...' --filter='./packages/apps/shopify-app-express...' --filter='./packages/apps/shopify-app-remix...' --filter='./packages/apps/shopify-app-react-router...' | |
| - name: Run shopify-api tests | |
| run: pnpm test:ci --filter='./packages/apps/shopify-api' | |
| - name: Run Express tests | |
| run: pnpm test:ci --filter='./packages/apps/shopify-app-express' | |
| - name: Run React Router tests | |
| run: pnpm test:ci --filter='./packages/apps/shopify-app-react-router' | |
| - name: Run Remix tests | |
| run: pnpm test:ci --filter='./packages/apps/shopify-app-remix' | |
| # Test Session storage packages | |
| test-session-storage: | |
| name: Test_Session_Storage_Node_${{ matrix.version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: [20.10.0, 22, 24] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1 | |
| with: | |
| cache: 'pnpm' | |
| node-version: ${{ matrix.version }} | |
| - name: Install | |
| run: pnpm install --frozen-lockfile | |
| - name: Build dependencies for session storage packages | |
| run: pnpm build --filter='./packages/apps/session-storage/*...' | |
| # Generate Prisma client for Prisma adapter tests | |
| - name: Generate Prisma client | |
| run: cd packages/apps/session-storage/shopify-app-session-storage-prisma && npx prisma generate | |
| # Run all session storage adapter tests | |
| - name: Run session storage tests | |
| run: pnpm test:ci_sessions --filter='./packages/apps/session-storage/*' |