marocchino-sticky-pull-requ.../.github/workflows/test.yml
Copilot df624d2eed
Fix failed ncc build (#1657)
* Initial plan

* Replace @vercel/ncc with esbuild to support @actions/core@3.0.0 (ESM-only)

Co-authored-by: marocchino <128431+marocchino@users.noreply.github.com>

* 📦️ Build

* Replace esbuild with rimraf + rollup for packaging

Co-authored-by: marocchino <128431+marocchino@users.noreply.github.com>

* Remove rollup.config.js build artifact from git tracking

Co-authored-by: marocchino <128431+marocchino@users.noreply.github.com>

* Remove yarn, switch to npm

Co-authored-by: marocchino <128431+marocchino@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: marocchino <128431+marocchino@users.noreply.github.com>
Co-authored-by: marocchino <marocchino@users.noreply.github.com>
2026-03-13 18:35:58 +09:00

49 lines
1.3 KiB
YAML

name: Test
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
- run: npm ci
- run: |
set -o pipefail
mkdir -p ./pr
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "all_result<<$EOF" >> "$GITHUB_ENV"
npm run all >> "$GITHUB_ENV" 2>&1 || true # proceed even if npm run all fails
echo >> "$GITHUB_ENV" # npm run all doesn't necessarily produce a newline
echo "$EOF" >> "$GITHUB_ENV"
id: all
- uses: ./
if: ${{ github.event_name == 'pull_request_target' }}
with:
header: All
message: |
<details open>
<summary>Output of npm run all</summary>
```shell
${{ env.all_result }}
```
</details>
- uses: ./
if: ${{ github.event_name == 'pull_request_target' }}
with:
header: All
append: true
hide_details: true
message: |
The build is over.
- name: Lint
run: npm run lint
- name: Format Check
run: npm run format-check