chore(deps): bump the npm_and_yarn group across 2 directories with 3 updates #15
Workflow file for this run
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: Test PostgreSQL Integration | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| jobs: | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x, 22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Compile TypeScript | |
| run: npm run compile | |
| - name: Run unit tests | |
| run: npm run test | |
| - name: Generate coverage report | |
| run: npm run coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: ./coverage/coverage-final.json | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| integration-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| postgres-version: [12, 14, 15, 16, 17] | |
| services: | |
| postgres: | |
| image: postgres:${{ matrix.postgres-version }}-alpine | |
| env: | |
| POSTGRES_USER: testuser | |
| POSTGRES_PASSWORD: testpass | |
| POSTGRES_DB: testdb | |
| 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 20.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Compile TypeScript | |
| run: npm run compile | |
| - name: Run integration tests | |
| run: npm run test:integration | |
| env: | |
| DB_HOST: localhost | |
| DB_PORT: 5432 | |
| DB_USER: testuser | |
| DB_PASSWORD: testpass | |
| DB_NAME: testdb | |
| - name: Upload integration test results | |
| if: always() | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: integration-test-results-pg${{ matrix.postgres-version }} | |
| path: test-results/ | |
| renderer-component-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js 20.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Compile TypeScript | |
| run: npm run compile | |
| - name: Run renderer component tests | |
| run: npm run test:renderer | |
| - name: Generate renderer test coverage | |
| run: npm run test:renderer:coverage | |
| docker-integration: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Start PostgreSQL test containers | |
| run: docker-compose -f docker-compose.test.yml up -d | |
| - name: Wait for PostgreSQL services | |
| run: | | |
| for port in 5412 5414 5415 5416 5417; do | |
| echo "Waiting for PostgreSQL on port $port..." | |
| until pg_isready -h localhost -p $port -U testuser; do | |
| sleep 1 | |
| done | |
| done | |
| env: | |
| PGPASSWORD: testpass | |
| - name: Use Node.js 20.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Compile TypeScript | |
| run: npm run compile | |
| - name: Run version compatibility tests | |
| run: npm run test:versions | |
| env: | |
| DB_HOST: localhost | |
| DB_USER: testuser | |
| DB_PASSWORD: testpass | |
| DB_NAME: testdb | |
| - name: Cleanup Docker containers | |
| if: always() | |
| run: docker-compose -f docker-compose.test.yml down | |
| lint-and-format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js 20.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Check TypeScript | |
| run: npm run compile -- --noEmit | |
| coverage-report: | |
| runs-on: ubuntu-latest | |
| needs: [unit-tests, integration-tests, renderer-component-tests] | |
| if: always() | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all coverage reports | |
| uses: actions/download-artifact@v3 | |
| with: | |
| path: coverage-reports | |
| - name: Generate coverage summary | |
| run: | | |
| echo "## Test Coverage Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "Unit Tests: ✓ Completed" >> $GITHUB_STEP_SUMMARY | |
| echo "Integration Tests: ✓ Completed (PostgreSQL 12-17)" >> $GITHUB_STEP_SUMMARY | |
| echo "Renderer Component Tests: ✓ Completed" >> $GITHUB_STEP_SUMMARY | |
| echo "Docker Integration: ✓ Completed" >> $GITHUB_STEP_SUMMARY | |
| security-audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run security audit | |
| run: npm audit --audit-level=moderate || true | |
| - name: Check for known vulnerabilities | |
| run: | | |
| npm list | grep vulnerable || echo "No known vulnerabilities found" |