Upcoming Release Changes (#2913) #3924
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: benchmarks | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| pull_request: | |
| paths-ignore: | |
| - 'website/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| server: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| scenario: | |
| - native | |
| - ponyfill | |
| - undici | |
| - uws | |
| 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: Setup K6 | |
| run: | | |
| wget https://github.com/grafana/k6/releases/download/v0.37.0/k6-v0.37.0-linux-amd64.deb | |
| sudo apt-get update | |
| sudo apt-get install ./k6-v0.37.0-linux-amd64.deb | |
| - name: Start Benchmark | |
| working-directory: ./benchmarks/server | |
| run: | | |
| npm run test | |
| env: | |
| SCENARIO: ${{ matrix.scenario }} | |
| NODE_NO_WARNINGS: true | |
| NODE_ENV: production | |
| GITHUB_PR: ${{ github.event.number }} | |
| GITHUB_SHA: ${{ github.sha }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| node-fetch: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| scenario: | |
| - noConsumeBody | |
| - consumeBody | |
| services: | |
| httpbin: | |
| image: mccutchen/go-httpbin | |
| env: | |
| PORT: 50000 | |
| ports: | |
| - 50000:50000 | |
| 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: Setup K6 | |
| run: | | |
| wget https://github.com/grafana/k6/releases/download/v0.37.0/k6-v0.37.0-linux-amd64.deb | |
| sudo apt-get update | |
| sudo apt-get install ./k6-v0.37.0-linux-amd64.deb | |
| - name: Start server | |
| working-directory: ./benchmarks/node-fetch | |
| run: npm run start:server & | |
| - name: Wait for server | |
| run: curl --retry 5 --retry-delay 1 --retry-connrefused http://localhost:50001 | |
| - name: Benchmark | |
| env: | |
| SCENARIO: ${{ matrix.scenario }} | |
| GITHUB_PR: ${{ github.event.number }} | |
| GITHUB_SHA: ${{ github.sha }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: k6 run ./benchmarks/node-fetch/k6.js |