v2.0.0 Release #138
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: | |
| license-check: | |
| runs-on: ubuntu-latest | |
| env: | |
| HUSKY: 0 | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js 22.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: HUSKY=0 pnpm run ci:install | |
| - name: Check license headers | |
| run: pnpm run check-licenses | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| HUSKY: 0 | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| needs: license-check | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_USER: test | |
| POSTGRES_PASSWORD: test | |
| POSTGRES_DB: test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js 22.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: HUSKY=0 pnpm run ci:install | |
| - name: Install Playwright browsers | |
| run: pnpm --filter @idpass/data-collect-admin exec playwright install --with-deps chromium | |
| - name: Run pr-check | |
| env: | |
| POSTGRES: postgresql://test:test@localhost:5432/test | |
| POSTGRES_TEST: postgresql://test:test@localhost:5432/test | |
| JWT_SECRET: ci_test_secret_that_is_at_least_32_chars_long! | |
| ADMIN_EMAIL: admin@example.com | |
| ADMIN_PASSWORD: "Correct horse battery staple 42!" | |
| run: pnpm run pr-check | |
| security: | |
| runs-on: ubuntu-latest | |
| env: | |
| HUSKY: 0 | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| needs: license-check | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js 20.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: HUSKY=0 pnpm run ci:install | |
| - name: Run security audit | |
| continue-on-error: true | |
| run: pnpm audit --prod |