chore(deps): bump glob from 11.0.3 to 11.1.0 #81
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/CD Pipeline | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| # === PRE-BUILD STAGE === | |
| setup-environment: | |
| name: Setup Build Environment | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| checks: write | |
| outputs: | |
| cache-key: ${{ steps.setup.outputs.cache-key }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js and pnpm | |
| uses: ./.github/actions/setup-node-pnpm | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Setup Docker Compose for testing | |
| run: | | |
| mkdir -p .docker/node_modules .docker/pnpm-store | |
| - name: Generate cache key | |
| id: setup | |
| run: echo "cache-key=node-modules-$(node -v)-$(pnpm -v)-${{ hashFiles('pnpm-lock.yaml') }}" >> $GITHUB_OUTPUT | |
| # === PARALLEL TEST STAGE === | |
| run-unit-tests: | |
| name: Run Unit Tests | |
| runs-on: ubuntu-latest | |
| needs: setup-environment | |
| permissions: | |
| contents: read | |
| packages: write | |
| checks: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js and pnpm | |
| uses: ./.github/actions/setup-node-pnpm | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.pnpm-store | |
| key: ${{ needs.setup-environment.outputs.cache-key }} | |
| - name: Run unit tests | |
| run: pnpm test | |
| run-integration-tests: | |
| name: Run Integration Tests | |
| runs-on: ubuntu-latest | |
| needs: setup-environment | |
| permissions: | |
| contents: read | |
| packages: write | |
| checks: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js and pnpm | |
| uses: ./.github/actions/setup-node-pnpm | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.pnpm-store | |
| key: ${{ needs.setup-environment.outputs.cache-key }} | |
| - name: Run integration tests | |
| run: pnpm test:integration || echo "No integration tests found, skipping" | |
| # === QUALITY GATE STAGE === | |
| generate-coverage: | |
| name: Generate Coverage Reports | |
| runs-on: ubuntu-latest | |
| needs: [setup-environment, run-unit-tests, run-integration-tests] | |
| permissions: | |
| contents: read | |
| packages: write | |
| checks: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js and pnpm | |
| uses: ./.github/actions/setup-node-pnpm | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.pnpm-store | |
| key: ${{ needs.setup-environment.outputs.cache-key }} | |
| - name: Generate coverage | |
| run: | | |
| mkdir -p coverage | |
| pnpm test:coverage | |
| - name: Upload coverage reports | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: coverage-reports | |
| path: coverage/ | |
| retention-days: 30 | |
| run-performance-benchmarks: | |
| name: Run Performance Benchmarks | |
| runs-on: ubuntu-latest | |
| needs: [setup-environment, run-unit-tests, run-integration-tests] | |
| permissions: | |
| contents: read | |
| packages: write | |
| checks: write | |
| outputs: | |
| duration: ${{ steps.benchmark.outputs.duration }} | |
| performance: ${{ steps.benchmark.outputs.performance }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js and pnpm | |
| uses: ./.github/actions/setup-node-pnpm | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.pnpm-store | |
| key: ${{ needs.setup-environment.outputs.cache-key }} | |
| - name: Run performance benchmarks | |
| id: benchmark | |
| run: | | |
| echo "duration=0s" >> $GITHUB_OUTPUT | |
| echo "performance=skipped" >> $GITHUB_OUTPUT | |
| # === BUILD STAGE === | |
| build-container-image: | |
| name: Build Container Image | |
| runs-on: ubuntu-latest | |
| needs: [generate-coverage, run-performance-benchmarks] | |
| permissions: | |
| contents: read | |
| packages: write | |
| outputs: | |
| image-tag: ${{ steps.tag.outputs.primary-tag }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Docker Buildx for release | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver: docker-container | |
| - name: Login to Container Registry | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| type=ref,event=branch,suffix=-{{sha}} | |
| type=ref,event=pr,suffix=-{{pr}} | |
| - name: Extract primary tag | |
| id: tag | |
| run: | | |
| PRIMARY_TAG=$(echo "${{ steps.meta.outputs.tags }}" | head -n1) | |
| echo "primary-tag=$PRIMARY_TAG" >> $GITHUB_OUTPUT | |
| echo "Using primary tag: $PRIMARY_TAG" | |
| - name: Build and push image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| target: runtime | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| platforms: linux/amd64,linux/arm64 | |
| build-native-binaries: | |
| name: Build Native Binaries | |
| runs-on: ubuntu-latest | |
| needs: [build-container-image] | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04] | |
| arch: [x64, arm64] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Docker Compose for native compilation | |
| run: | | |
| mkdir -p .docker/node_modules .docker/pnpm-store | |
| - name: Build native binaries | |
| uses: ./.github/actions/build-native-binaries | |
| with: | |
| os: ${{ matrix.os }} | |
| arch: ${{ matrix.arch }} | |
| use-container: 'false' | |
| container-image: ${{ needs.build-container-image.outputs.image-tag }} | |
| # === DEPLOY STAGE === | |
| create-release: | |
| name: Create GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: [build-native-binaries, build-container-image] | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Create GitHub Release | |
| uses: ./.github/actions/create-release | |
| with: | |
| generate-notes: true | |
| draft: false | |
| prerelease: false | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| publish-npm-package: | |
| name: Publish to NPM | |
| runs-on: ubuntu-latest | |
| needs: [build-native-binaries, build-container-image] | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Publish to NPM | |
| uses: ./.github/actions/publish-npm | |
| with: | |
| token: ${{ secrets.NPM_TOKEN }} | |
| # === REPORTING STAGE === | |
| test-reporting: | |
| name: Test Results Summary | |
| runs-on: ubuntu-latest | |
| needs: [run-unit-tests, run-integration-tests, generate-coverage, run-performance-benchmarks] | |
| if: always() | |
| permissions: | |
| contents: read | |
| packages: write | |
| checks: write | |
| steps: | |
| - name: Test summary | |
| run: | | |
| echo "## 🧪 CI/CD Pipeline Results" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### ✅ Test Execution" >> $GITHUB_STEP_SUMMARY | |
| echo "- Unit Tests: ${{ needs.run-unit-tests.result }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- Integration Tests: ${{ needs.run-integration-tests.result }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- Coverage Generation: ${{ needs.generate-coverage.result }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- Performance Benchmarks: ${{ needs.run-performance-benchmarks.result }}" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### 📊 Performance Metrics" >> $GITHUB_STEP_SUMMARY | |
| echo "- Duration: ${{ needs.run-performance-benchmarks.outputs.duration }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- Performance: ${{ needs.run-performance-benchmarks.outputs.performance }}" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY |