Upcoming Release Changes (#2913) #9021
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 | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| pull_request: | |
| paths-ignore: | |
| - 'website/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=4096 | |
| NODE_NO_WARNINGS: 1 | |
| CI: true | |
| jobs: | |
| prettier-check: | |
| name: prettier | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Master | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Setup env | |
| uses: the-guild-org/shared-config/setup@v1 | |
| with: | |
| node-version-file: .node-version | |
| - name: Prettier Check | |
| run: npm run prettier:check | |
| lint: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Master | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Setup env | |
| uses: the-guild-org/shared-config/setup@v1 | |
| with: | |
| node-version-file: .node-version | |
| - name: ESLint | |
| run: npm run lint | |
| type-check: | |
| name: type check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Master | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Setup env | |
| uses: the-guild-org/shared-config/setup@v1 | |
| with: | |
| node-version-file: .node-version | |
| - name: Type Check | |
| run: npm run ts:check | |
| unit: | |
| name: unit / node ${{matrix.node-version}} | |
| runs-on: ubuntu-latest | |
| services: | |
| httpbin: | |
| image: kennethreitz/httpbin | |
| ports: | |
| - 8888:80 | |
| strategy: | |
| matrix: | |
| node-version: [18, 20, 24, 25] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout Master | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Install Required Libraries | |
| run: sudo apt update && sudo apt install -y libcurl4-openssl-dev libssl-dev | |
| - name: Setup env | |
| uses: the-guild-org/shared-config/setup@v1 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Cache Jest | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: .cache/jest | |
| key: ${{ runner.os }}-${{matrix.node-version}}-jest-${{ hashFiles('yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{matrix.node-version}}-jest- | |
| - name: Unit Tests | |
| uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 | |
| with: | |
| timeout_minutes: 10 | |
| max_attempts: 5 | |
| command: npm run test --ci | |
| - name: Leak Tests | |
| uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 | |
| with: | |
| timeout_minutes: 10 | |
| max_attempts: 5 | |
| command: npm run test:leaks --ci | |
| unit-bun: | |
| name: unit / bun | |
| runs-on: ubuntu-latest | |
| services: | |
| httpbin: | |
| image: kennethreitz/httpbin | |
| ports: | |
| - 8888:80 | |
| steps: | |
| - name: Checkout Master | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Setup env | |
| uses: the-guild-org/shared-config/setup@v1 | |
| with: | |
| node-version-file: .node-version | |
| - name: Test | |
| run: npm run test:bun --ci | |
| unit-deno: | |
| name: unit / deno | |
| runs-on: ubuntu-latest | |
| services: | |
| httpbin: | |
| image: kennethreitz/httpbin | |
| ports: | |
| - 8888:80 | |
| steps: | |
| - name: Checkout Master | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Setup env | |
| uses: the-guild-org/shared-config/setup@v1 | |
| with: | |
| node-version-file: .node-version | |
| - name: Test | |
| uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 | |
| with: | |
| timeout_minutes: 10 | |
| max_attempts: 5 | |
| command: npm run test:deno | |
| esm: | |
| name: esm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Master | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Setup env | |
| uses: the-guild-org/shared-config/setup@v1 | |
| with: | |
| node-version-file: .node-version | |
| - name: Build Packages | |
| run: npm run build | |
| - name: Test ESM | |
| run: npm run esm:check | |
| e2e: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| plan: ['aws-lambda', 'cloudflare-workers', 'cloudflare-modules'] | |
| # TODO: Add vercel and azure | |
| name: e2e / ${{ matrix.plan }} | |
| env: | |
| # Pulumi | |
| PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | |
| # AWS | |
| AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} | |
| AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} | |
| AWS_REGION: ${{ secrets.AWS_REGION }} | |
| AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} | |
| # Azure | |
| AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | |
| AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} | |
| AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | |
| AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| # CloudFlare | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} | |
| # Vercel | |
| VERCEL_AUTH_TOKEN: ${{ secrets.VERCEL_AUTH_TOKEN }} | |
| VERCEL_TEAM_ID: ${{ secrets.VERCEL_TEAM_ID }} | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.head.repo.fork != true | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Setup env | |
| uses: the-guild-org/shared-config/setup@v1 | |
| with: | |
| node-version-file: .node-version | |
| - name: Build Packages | |
| run: npm run build | |
| - name: Install pulumi | |
| uses: pulumi/setup-pulumi@b374ceb6168550de27c6eba92e01c1a774040e11 # v2 | |
| - name: Set outputs | |
| id: vars | |
| run: | | |
| echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | |
| echo "::set-output name=docker_host::$(docker context inspect --format '{{.Endpoints.docker.Host}}')" | |
| - name: Provision & Test | |
| run: npm run e2e | |
| working-directory: e2e/${{ matrix.plan }} | |
| env: | |
| COMMIT_ID: ${{ steps.vars.outputs.sha_short }} | |
| - name: Ensure Deletion | |
| run: npm run e2e | |
| if: ${{ always() }} | |
| working-directory: e2e/${{ matrix.plan }} | |
| env: | |
| COMMIT_ID: ${{ steps.vars.outputs.sha_short }} | |
| ENSURE_DELETION: 1 |