chore(deps): bump actions/checkout from 4 to 5 #8
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, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:17 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: overland_test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 8 | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Type check | |
| run: pnpm typecheck | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Format check | |
| run: pnpm format:check | |
| - name: Build | |
| run: pnpm build | |
| env: | |
| DATABASE_URI: postgresql://postgres:postgres@localhost:5432/overland_test | |
| PAYLOAD_SECRET: test-secret-key-for-ci | |
| PAYLOAD_PUBLIC_SERVER_URL: http://localhost:3001 | |
| PAYLOAD_PUBLIC_CMS_URL: http://localhost:3001/admin | |
| - name: Run unit tests | |
| run: pnpm test:unit | |
| env: | |
| DATABASE_URI: postgresql://postgres:postgres@localhost:5432/overland_test | |
| PAYLOAD_SECRET: test-secret-key-for-ci | |
| PAYLOAD_PUBLIC_SERVER_URL: http://localhost:3001 | |
| PAYLOAD_PUBLIC_CMS_URL: http://localhost:3001/admin | |
| e2e: | |
| name: E2E Tests | |
| runs-on: ubuntu-latest | |
| needs: test | |
| services: | |
| postgres: | |
| image: postgres:17 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: overland_test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 8 | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Install Playwright Browsers | |
| run: pnpm exec playwright install --with-deps | |
| - name: Build applications | |
| run: pnpm build | |
| env: | |
| DATABASE_URI: postgresql://postgres:postgres@localhost:5432/overland_test | |
| PAYLOAD_SECRET: test-secret-key-for-ci | |
| PAYLOAD_PUBLIC_SERVER_URL: http://localhost:3001 | |
| PAYLOAD_PUBLIC_CMS_URL: http://localhost:3001/admin | |
| - name: Start applications | |
| run: | | |
| pnpm start & | |
| sleep 10 | |
| env: | |
| DATABASE_URI: postgresql://postgres:postgres@localhost:5432/overland_test | |
| PAYLOAD_SECRET: test-secret-key-for-ci | |
| PAYLOAD_PUBLIC_SERVER_URL: http://localhost:3001 | |
| PAYLOAD_PUBLIC_CMS_URL: http://localhost:3001/admin | |
| - name: Run E2E tests | |
| run: pnpm test:e2e | |
| env: | |
| DATABASE_URI: postgresql://postgres:postgres@localhost:5432/overland_test | |
| PAYLOAD_SECRET: test-secret-key-for-ci | |
| PAYLOAD_PUBLIC_SERVER_URL: http://localhost:3001 | |
| PAYLOAD_PUBLIC_CMS_URL: http://localhost:3001/admin | |
| - name: Upload Playwright Report | |
| uses: actions/upload-artifact@v3 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 30 |