Skip to content

Commit e4a8907

Browse files
committed
refactor: move smoke test to npm publish workflow
- Move smoke test from standalone workflow to publish-npm.yml - Run smoke test after build, before npm publish - Remove smoke-test.yml standalone workflow - Smoke test now acts as gate before publishing to npm This ensures packages are validated before publishing rather than after merge to main. _Generated with `mux`_
1 parent 930d5f4 commit e4a8907

File tree

2 files changed

+33
-61
lines changed

2 files changed

+33
-61
lines changed

.github/workflows/publish-npm.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,39 @@ jobs:
6969
- name: Build application
7070
run: make build
7171

72+
- name: Pack npm package for smoke test
73+
run: npm pack
74+
75+
- name: Find package tarball
76+
id: find-tarball
77+
run: |
78+
TARBALL=$(ls mux-*.tgz | head -1)
79+
echo "tarball=$TARBALL" >> $GITHUB_OUTPUT
80+
echo "Found package: $TARBALL"
81+
82+
- name: Run smoke test
83+
env:
84+
PACKAGE_TARBALL: ${{ steps.find-tarball.outputs.tarball }}
85+
SERVER_PORT: 3000
86+
SERVER_HOST: localhost
87+
STARTUP_TIMEOUT: 30
88+
run: |
89+
./scripts/smoke-test.sh
90+
91+
- name: Upload server logs on smoke test failure
92+
if: failure()
93+
uses: actions/upload-artifact@v4
94+
with:
95+
name: smoke-test-logs
96+
path: |
97+
/tmp/mux-smoke-test-*/server.log
98+
if-no-files-found: warn
99+
retention-days: 7
100+
101+
- name: Clean up tarball
102+
if: always()
103+
run: rm -f mux-*.tgz
104+
72105
- name: Check if version exists
73106
id: check-exists
74107
run: |

.github/workflows/smoke-test.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)