fix: require smoke tests before publishing, reduce CI instance wait
Some checks failed
CI/CD / lint (push) Successful in 48s
CI/CD / test (push) Successful in 59s
CI/CD / typecheck (push) Has been cancelled
CI/CD / smoke (push) Has been cancelled
CI/CD / build (amd64) (push) Has been cancelled
CI/CD / build (arm64) (push) Has been cancelled
CI/CD / publish-rpm (amd64) (push) Has been cancelled
CI/CD / publish-rpm (arm64) (push) Has been cancelled
CI/CD / publish-deb (amd64) (push) Has been cancelled
CI/CD / publish-deb (arm64) (push) Has been cancelled
Some checks failed
CI/CD / lint (push) Successful in 48s
CI/CD / test (push) Successful in 59s
CI/CD / typecheck (push) Has been cancelled
CI/CD / smoke (push) Has been cancelled
CI/CD / build (amd64) (push) Has been cancelled
CI/CD / build (arm64) (push) Has been cancelled
CI/CD / publish-rpm (amd64) (push) Has been cancelled
CI/CD / publish-rpm (arm64) (push) Has been cancelled
CI/CD / publish-deb (amd64) (push) Has been cancelled
CI/CD / publish-deb (arm64) (push) Has been cancelled
- publish-rpm and publish-deb now depend on both build and smoke jobs, so packages are only published after all tests pass - Reduce "Wait for server instance" from 60x5s (5min) to 10x2s (20s) since Docker containers can't run in CI anyway - Add debug output to RPM/DEB packaging steps Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -219,19 +219,19 @@ jobs:
|
|||||||
- name: Wait for server instance
|
- name: Wait for server instance
|
||||||
run: |
|
run: |
|
||||||
echo "Waiting for smoke-aws-docs instance..."
|
echo "Waiting for smoke-aws-docs instance..."
|
||||||
for i in $(seq 1 60); do
|
for i in $(seq 1 10); do
|
||||||
STATUS=$(mcpctl get instances -o json 2>/dev/null | \
|
STATUS=$(mcpctl get instances -o json 2>/dev/null | \
|
||||||
node -e "try{const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf-8'));const i=Array.isArray(d)?d.find(x=>x.serverName&&x.serverName.includes('aws')):null;console.log(i?.status??'WAITING')}catch{console.log('WAITING')}" 2>/dev/null || echo "WAITING")
|
node -e "try{const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf-8'));const i=Array.isArray(d)?d.find(x=>x.serverName&&x.serverName.includes('aws')):null;console.log(i?.status??'WAITING')}catch{console.log('WAITING')}" 2>/dev/null || echo "WAITING")
|
||||||
echo " Instance status: $STATUS ($i/60)"
|
echo " Instance status: $STATUS ($i/10)"
|
||||||
if [ "$STATUS" = "RUNNING" ]; then
|
if [ "$STATUS" = "RUNNING" ]; then
|
||||||
echo "Instance is running!"
|
echo "Instance is running!"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$i" = "60" ]; then
|
if [ "$i" = "10" ]; then
|
||||||
echo "::warning::Instance did not reach RUNNING — container management may not be available in CI"
|
echo "::warning::Instance did not reach RUNNING — container management may not be available in CI"
|
||||||
echo "API-layer smoke tests will still run"
|
echo "API-layer smoke tests will still run"
|
||||||
fi
|
fi
|
||||||
sleep 5
|
sleep 2
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Run smoke tests
|
- name: Run smoke tests
|
||||||
@@ -311,12 +311,18 @@ jobs:
|
|||||||
- name: Package RPM (${{ matrix.arch }})
|
- name: Package RPM (${{ matrix.arch }})
|
||||||
env:
|
env:
|
||||||
NFPM_ARCH: ${{ matrix.arch }}
|
NFPM_ARCH: ${{ matrix.arch }}
|
||||||
run: nfpm pkg --packager rpm --target dist/
|
run: |
|
||||||
|
echo "Packaging RPM for arch: $NFPM_ARCH"
|
||||||
|
nfpm pkg --packager rpm --target dist/
|
||||||
|
ls -la dist/mcpctl-*.rpm
|
||||||
|
|
||||||
- name: Package DEB (${{ matrix.arch }})
|
- name: Package DEB (${{ matrix.arch }})
|
||||||
env:
|
env:
|
||||||
NFPM_ARCH: ${{ matrix.arch }}
|
NFPM_ARCH: ${{ matrix.arch }}
|
||||||
run: nfpm pkg --packager deb --target dist/
|
run: |
|
||||||
|
echo "Packaging DEB for arch: $NFPM_ARCH"
|
||||||
|
nfpm pkg --packager deb --target dist/
|
||||||
|
ls -la dist/mcpctl*.deb
|
||||||
|
|
||||||
- name: Upload RPM artifact
|
- name: Upload RPM artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
@@ -340,7 +346,7 @@ jobs:
|
|||||||
|
|
||||||
publish-rpm:
|
publish-rpm:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
needs: [build, smoke]
|
||||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -394,7 +400,7 @@ jobs:
|
|||||||
|
|
||||||
publish-deb:
|
publish-deb:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
needs: [build, smoke]
|
||||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|||||||
Reference in New Issue
Block a user