microsoft/typespec
Publicmirrored from https://github.com/microsoft/typespecAvailable
.github/workflows/external-integration.yml
68lines · modecode
| 1 | name: Integration |
| 2 | |
| 3 | on: |
| 4 | pull_request: |
| 5 | branches: ["main"] |
| 6 | paths-ignore: |
| 7 | - "packages/http-client-csharp/**" |
| 8 | - "packages/http-client-java/**" |
| 9 | - "packages/http-client-python/**" |
| 10 | - "website/**" |
| 11 | - "docs/**" |
| 12 | # Allow manual triggering |
| 13 | workflow_dispatch: |
| 14 | |
| 15 | # This check is optional by default |
| 16 | concurrency: |
| 17 | group: ${{ github.workflow }}-${{ github.ref }} |
| 18 | cancel-in-progress: true |
| 19 | |
| 20 | jobs: |
| 21 | azure-integration-check: |
| 22 | name: Azure/typespec-azure |
| 23 | runs-on: ubuntu-latest |
| 24 | # Only run if not from dependabot, publish, backmerge, or revert branches |
| 25 | if: | |
| 26 | !startsWith(github.head_ref, 'dependabot/') && |
| 27 | !startsWith(github.head_ref, 'publish/') && |
| 28 | !startsWith(github.head_ref, 'backmerge/') && |
| 29 | !startsWith(github.head_ref, 'revert-') |
| 30 | |
| 31 | steps: |
| 32 | - name: Setup Node.js |
| 33 | uses: actions/setup-node@v4 |
| 34 | with: |
| 35 | node-version: lts/* |
| 36 | |
| 37 | - name: Checkout Azure/typespec-azure repo |
| 38 | uses: actions/checkout@v4 |
| 39 | with: |
| 40 | repository: Azure/typespec-azure |
| 41 | submodules: true |
| 42 | |
| 43 | - name: Install pnpm |
| 44 | uses: pnpm/action-setup@v3 |
| 45 | |
| 46 | - name: Update core submodule to PR commit |
| 47 | run: | |
| 48 | # Configure git to use the PR's repository as a remote for the submodule |
| 49 | cd core |
| 50 | git remote add pr https://github.com/${{ github.repository }}.git |
| 51 | git fetch pr ${{ github.event.pull_request.head.sha }} |
| 52 | # Update the submodule to point to the PR commit |
| 53 | git checkout ${{ github.event.pull_request.head.sha }} |
| 54 | |
| 55 | - name: Install |
| 56 | run: pnpm install --no-frozen-lockfile |
| 57 | |
| 58 | - name: Install Playwright |
| 59 | run: pnpm exec playwright install |
| 60 | |
| 61 | - name: Build |
| 62 | run: pnpm build |
| 63 | |
| 64 | - name: Test |
| 65 | run: pnpm test |
| 66 | |
| 67 | - name: E2E Test |
| 68 | run: pnpm test:e2e |
| 69 | |