diff options
author | 2023-03-07 01:22:42 +0200 | |
---|---|---|
committer | 2023-03-06 15:22:42 -0800 | |
commit | b211fb129865010da61e0913d0a0be1a24154458 (patch) | |
tree | 7415f5c93bab6e70992e4d0b9802a62db6561c58 | |
parent | 7f715e15cc39ec24cc56f317a2a68b8d5f1bff87 (diff) | |
download | bun-b211fb129865010da61e0913d0a0be1a24154458.tar.gz bun-b211fb129865010da61e0913d0a0be1a24154458.tar.zst bun-b211fb129865010da61e0913d0a0be1a24154458.zip |
`bun test` on macOS in GitHub Actions (#2322)
-rw-r--r-- | .github/workflows/bun-linux-build.yml | 2 | ||||
-rw-r--r-- | .github/workflows/bun-mac-x64-baseline.yml | 73 |
2 files changed, 74 insertions, 1 deletions
diff --git a/.github/workflows/bun-linux-build.yml b/.github/workflows/bun-linux-build.yml index 2b3074b87..75c84c7f6 100644 --- a/.github/workflows/bun-linux-build.yml +++ b/.github/workflows/bun-linux-build.yml @@ -170,7 +170,7 @@ jobs: submodules: false - id: download name: Download - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: bun-${{matrix.tag}} path: ${{runner.temp}}/release diff --git a/.github/workflows/bun-mac-x64-baseline.yml b/.github/workflows/bun-mac-x64-baseline.yml index d8ddd18c4..c4309a66c 100644 --- a/.github/workflows/bun-mac-x64-baseline.yml +++ b/.github/workflows/bun-mac-x64-baseline.yml @@ -388,3 +388,76 @@ jobs: name: "Canary (${{github.sha}})" tag: "canary" artifacts: "${{runner.temp}}/release/${{matrix.tag}}.zip,${{runner.temp}}/release/${{matrix.tag}}-profile.zip" + macOS-test: + name: Tests ${{matrix.tag}} + runs-on: ${{ matrix.runner }} + needs: [macOS] + if: github.event_name == 'pull_request' + timeout-minutes: 10 + outputs: + failing_tests: ${{ steps.test.outputs.failing_tests }} + failing_tests_count: ${{ steps.test.outputs.failing_tests_count }} + strategy: + fail-fast: false + matrix: + include: + - tag: bun-darwin-x64-baseline + steps: + - id: checkout + name: Checkout + uses: actions/checkout@v3 + with: + submodules: false + - id: download + name: Download + uses: actions/download-artifact@v3 + with: + name: ${{matrix.tag}} + path: ${{runner.temp}}/release + - id: install + name: Install + run: | + cd ${{runner.temp}}/release + unzip ${{matrix.tag}}.zip + cd ${{matrix.tag}} + chmod +x bun + sudo mv bun /usr/local/bin/bun + bun --version + - id: test + name: Test (node runner) + # if: ${{github.event.inputs.use_bun == 'false'}} + run: | + bun install + bun install --cwd test/bun.js + bun install --cwd test/bun.js/third-party/body-parser-test + #bun install --cwd test/bun.js/third-party/napi_create_external + bun install --cwd packages/bun-internal-test + node packages/bun-internal-test/src/runner.node.mjs || true + - name: Comment on PR + if: steps.test.outputs.failing_tests != '' && github.event_name == 'pull_request' + uses: thollander/actions-comment-pull-request@v2 + with: + comment_tag: test-failures-${{matrix.tag}} + message: | + ❌ @${{ github.actor }} ${{ steps.test.outputs.failing_tests_count }} files with test failures on ${{ matrix.tag }}: + + ${{ steps.test.outputs.failing_tests }} + + **[View test output](https://github.com/oven-sh/bun/actions/runs/${{github.run_id}})** + + <sup>[#${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}})</sup> + - name: Uncomment on PR + if: steps.test.outputs.failing_tests == '' && github.event_name == 'pull_request' + uses: thollander/actions-comment-pull-request@v2 + with: + comment_tag: test-failures-${{matrix.tag}} + mode: upsert + create_if_not_exists: false + message: | + ✅ test failures on ${{ matrix.tag }} have been resolved. + + <sup>[#${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}})</sup> + - id: fail + name: Fail the build + if: steps.test.outputs.failing_tests != '' + run: exit 1 |