Skip to content

Convert build system from Bun to pnpm and fix CI workflows #19

Convert build system from Bun to pnpm and fix CI workflows

Convert build system from Bun to pnpm and fix CI workflows #19

Workflow file for this run

name: Test Action
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
actions: read
jobs:
test-basic:
name: Test Basic Usage
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Start Workflow Telemetry
uses: ./
- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: "24"
cache: "pnpm"
- name: Install Dependencies
run: pnpm install
- name: Run Tests
run: pnpm test
- name: Build Project
run: pnpm run build
- name: Verify Build Artifacts
run: |
test -f dist/main/index.js
test -f dist/main/server.js
test -f dist/post/index.js
echo "All build artifacts present"
test-automatic-step-tracking:
name: Test Automatic Step Tracking
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Start Workflow Telemetry with GitHub Token
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: "24"
cache: "pnpm"
- name: Install Dependencies
run: pnpm install
- name: Type Check
run: pnpm run tsc
- name: Run Tests
run: pnpm test
- name: Build Project
run: pnpm run build
test-manual-step-markers:
name: Test Manual Step Markers
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Start Workflow Telemetry
uses: ./
with:
interval_seconds: "3"
- name: Wait for Server
run: |
echo "Waiting for metrics server to be ready on port 7777..."
timeout=30
elapsed=0
while ! curl -s -f http://localhost:7777/metrics > /dev/null 2>&1; do
if [ $elapsed -ge $timeout ]; then
echo "Timeout waiting for server to start"
exit 1
fi
echo "Server not ready yet, waiting... ($elapsed/$timeout seconds)"
sleep 1
elapsed=$((elapsed + 1))
done
echo "Server is ready!"
- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: "24"
cache: "pnpm"
- name: Install Dependencies with Manual Markers
run: |
curl -X POST http://localhost:7777/mark-step \
-H "Content-Type: application/json" \
-d '{"stepName":"Install Dependencies","status":"start"}'
pnpm install
curl -X POST http://localhost:7777/mark-step \
-H "Content-Type: application/json" \
-d '{"stepName":"Install Dependencies","status":"end"}'
- name: Build with Manual Markers
run: |
curl -X POST http://localhost:7777/mark-step \
-H "Content-Type: application/json" \
-d '{"stepName":"Build Project","status":"start"}'
pnpm run build
curl -X POST http://localhost:7777/mark-step \
-H "Content-Type: application/json" \
-d '{"stepName":"Build Project","status":"end"}'
- name: Test with Manual Markers
run: |
curl -X POST http://localhost:7777/mark-step \
-H "Content-Type: application/json" \
-d '{"stepName":"Run Tests","status":"start"}'
pnpm test
curl -X POST http://localhost:7777/mark-step \
-H "Content-Type: application/json" \
-d '{"stepName":"Run Tests","status":"end"}'
test-custom-interval:
name: Test Custom Interval
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Start Workflow Telemetry with Custom Interval
uses: ./
with:
interval_seconds: "2"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: "24"
cache: "pnpm"
- name: Simulate Workload
run: |
echo "Simulating CPU and memory intensive workload"
sleep 10
echo "Workload simulation complete"
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true