Version Packages (#66) #308
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: Build & Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| checks: write | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build Projects | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install PNPM | |
| uses: pnpm/action-setup@v6 | |
| - name: NodeJS Setup | |
| uses: actions/setup-node@v6 | |
| with: | |
| cache: pnpm | |
| node-version: 24 | |
| - name: Install Dependencies | |
| run: pnpm install | |
| - name: Build project | |
| run: pnpm build | |
| - name: Cache Build | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: . | |
| key: build-${{ github.run_id }}-${{ github.run_attempt }} | |
| lint-js: | |
| name: Lint JavaScript | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install PNPM | |
| uses: pnpm/action-setup@v6 | |
| - name: NodeJS Setup | |
| uses: actions/setup-node@v6 | |
| with: | |
| cache: pnpm | |
| node-version: 24 | |
| - name: Load Cache | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: . | |
| key: build-${{ github.run_id }}-${{ github.run_attempt }} | |
| - name: Lint JavaScript | |
| id: lint_js | |
| run: | | |
| pnpm lint | |
| core_test: | |
| name: Core SDK Tests | |
| runs-on: ubuntu-latest | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [20, 22, 24] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install PNPM | |
| uses: pnpm/action-setup@v6 | |
| - name: NodeJS Setup | |
| uses: actions/setup-node@v6 | |
| with: | |
| cache: pnpm | |
| node-version: ${{ matrix.node-version }} | |
| - name: Load Cache | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: . | |
| key: build-${{ github.run_id }}-${{ github.run_attempt }} | |
| - name: Install Dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| - name: Test Core | |
| run: pnpm --filter @monocloud/auth-core run test | |
| - name: Upload test results | |
| id: upload_artifact | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: "auth-core-tests-${{ matrix.node-version }}" | |
| path: "**/packages/core/coverage/junit*.xml" | |
| overwrite: true | |
| - name: Report Test Results | |
| if: success() || failure() | |
| uses: dorny/test-reporter@v3 | |
| with: | |
| artifact: "auth-core-tests-${{ matrix.node-version }}" | |
| name: "Core SDK Tests (${{ matrix.node-version }})" | |
| path: "**/packages/core/coverage/junit*.xml" | |
| reporter: java-junit | |
| fail-on-error: false | |
| node_core_test: | |
| name: Node Core SDK Tests | |
| runs-on: ubuntu-latest | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [20, 22, 24] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install PNPM | |
| uses: pnpm/action-setup@v6 | |
| - name: NodeJS Setup | |
| uses: actions/setup-node@v6 | |
| with: | |
| cache: pnpm | |
| node-version: ${{ matrix.node-version }} | |
| - name: Load Cache | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: . | |
| key: build-${{ github.run_id }}-${{ github.run_attempt }} | |
| - name: Install Dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| - name: Test Node Core | |
| run: pnpm --filter @monocloud/auth-node-core run test | |
| - name: Upload test results | |
| id: upload_artifact | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: "auth-node-core-tests-${{ matrix.node-version }}" | |
| path: "**/packages/node-core/coverage/junit*.xml" | |
| overwrite: true | |
| - name: Report Test Results | |
| if: success() || failure() | |
| uses: dorny/test-reporter@v3 | |
| with: | |
| artifact: "auth-node-core-tests-${{ matrix.node-version }}" | |
| name: "Node Core SDK Tests (${{ matrix.node-version }})" | |
| path: "**/packages/node-core/coverage/junit*.xml" | |
| reporter: java-junit | |
| fail-on-error: false | |
| nextjs_test: | |
| name: Next.js SDK Tests | |
| runs-on: ubuntu-latest | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [20, 22, 24] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install PNPM | |
| uses: pnpm/action-setup@v6 | |
| - name: NodeJS Setup | |
| uses: actions/setup-node@v6 | |
| with: | |
| cache: pnpm | |
| node-version: ${{ matrix.node-version }} | |
| - name: Load Cache | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: . | |
| key: build-${{ github.run_id }}-${{ github.run_attempt }} | |
| - name: Install Dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| - name: Test Next.js | |
| run: pnpm --filter @monocloud/auth-nextjs run test | |
| - name: Upload test results | |
| id: upload_artifact | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: "auth-nextjs-tests-${{ matrix.node-version }}" | |
| path: "**/packages/nextjs/coverage/junit*.xml" | |
| overwrite: true | |
| - name: Report Test Results | |
| if: success() || failure() | |
| uses: dorny/test-reporter@v3 | |
| with: | |
| artifact: "auth-nextjs-tests-${{ matrix.node-version }}" | |
| name: "Next.js SDK Tests (${{ matrix.node-version }})" | |
| path: "**/packages/nextjs/coverage/junit*.xml" | |
| reporter: java-junit | |
| fail-on-error: false | |
| node_backend_test: | |
| name: Node Backend SDK Tests | |
| runs-on: ubuntu-latest | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [20, 22, 24] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install PNPM | |
| uses: pnpm/action-setup@v6 | |
| - name: NodeJS Setup | |
| uses: actions/setup-node@v6 | |
| with: | |
| cache: pnpm | |
| node-version: ${{ matrix.node-version }} | |
| - name: Load Cache | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: . | |
| key: build-${{ github.run_id }}-${{ github.run_attempt }} | |
| - name: Install Dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| - name: Test Node Backend | |
| run: pnpm --filter @monocloud/backend-node run test | |
| - name: Upload test results | |
| id: upload_artifact | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: "auth-node-backend-tests-${{ matrix.node-version }}" | |
| path: "**/packages/node-backend/coverage/junit*.xml" | |
| overwrite: true | |
| - name: Report Test Results | |
| if: success() || failure() | |
| uses: dorny/test-reporter@v3 | |
| with: | |
| artifact: "auth-node-backend-tests-${{ matrix.node-version }}" | |
| name: "Node Backend SDK Tests (${{ matrix.node-version }})" | |
| path: "**/packages/node-backend/coverage/junit*.xml" | |
| reporter: java-junit | |
| fail-on-error: false | |
| web_js_test: | |
| name: Web JS SDK Tests | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install PNPM | |
| uses: pnpm/action-setup@v6 | |
| - name: NodeJS Setup | |
| uses: actions/setup-node@v6 | |
| with: | |
| cache: pnpm | |
| node-version: 24 | |
| - name: Load Cache | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: . | |
| key: build-${{ github.run_id }}-${{ github.run_attempt }} | |
| - name: Install Dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| - name: Test Web JS | |
| run: pnpm --filter @monocloud/auth-web-js run test | |
| - name: Upload test results | |
| id: upload_artifact | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: "auth-web-js-tests" | |
| path: "**/packages/web-js/coverage/junit*.xml" | |
| overwrite: true | |
| - name: Report Test Results | |
| if: success() || failure() | |
| uses: dorny/test-reporter@v3 | |
| with: | |
| artifact: "auth-web-js-tests" | |
| name: "Web JS SDK Tests" | |
| path: "**/packages/web-js/coverage/junit*.xml" | |
| reporter: java-junit | |
| fail-on-error: false | |
| react_test: | |
| name: React SDK Tests | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install PNPM | |
| uses: pnpm/action-setup@v6 | |
| - name: NodeJS Setup | |
| uses: actions/setup-node@v6 | |
| with: | |
| cache: pnpm | |
| node-version: 24 | |
| - name: Load Cache | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: . | |
| key: build-${{ github.run_id }}-${{ github.run_attempt }} | |
| - name: Install Dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| - name: Test React | |
| run: pnpm --filter @monocloud/auth-react run test | |
| - name: Upload test results | |
| id: upload_artifact | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: "auth-react-tests" | |
| path: "**/packages/react/coverage/junit*.xml" | |
| overwrite: true | |
| - name: Report Test Results | |
| if: success() || failure() | |
| uses: dorny/test-reporter@v3 | |
| with: | |
| artifact: "auth-react-tests" | |
| name: "React SDK Tests" | |
| path: "**/packages/react/coverage/junit*.xml" | |
| reporter: java-junit | |
| fail-on-error: false |