Skip to content

Commit 12e69a4

Browse files
committed
feat(release): add smoke tests across all distribution channels after publish
1 parent 16a68a1 commit 12e69a4

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,58 @@ jobs:
4848
npm publish --access public
4949
env:
5050
NODE_AUTH_TOKEN: ${{ secrets.SUPERMODEL_NPM_TOKEN }}
51+
52+
wait-for-propagation:
53+
name: wait for package propagation
54+
needs: release
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Sleep 5 minutes
58+
run: sleep 300
59+
60+
smoke-test:
61+
name: smoke test / ${{ matrix.name }}
62+
needs: wait-for-propagation
63+
strategy:
64+
fail-fast: false
65+
matrix:
66+
include:
67+
- name: install.sh
68+
os: ubuntu-latest
69+
- name: npm
70+
os: ubuntu-latest
71+
- name: homebrew
72+
os: macos-latest
73+
- name: scoop
74+
os: windows-latest
75+
runs-on: ${{ matrix.os }}
76+
steps:
77+
- name: Install via install.sh
78+
if: matrix.name == 'install.sh'
79+
run: |
80+
curl -fsSL https://supermodeltools.com/install.sh | SUPERMODEL_INSTALL_DIR="$HOME/.local/bin" sh
81+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
82+
83+
- name: Install via npm
84+
if: matrix.name == 'npm'
85+
run: npm install -g @supermodeltools/cli
86+
87+
- name: Install via Homebrew
88+
if: matrix.name == 'homebrew'
89+
run: brew install supermodeltools/tap/supermodel
90+
91+
- name: Install via Scoop
92+
if: matrix.name == 'scoop'
93+
shell: pwsh
94+
run: |
95+
scoop bucket add supermodeltools https://github.com/supermodeltools/scoop-bucket
96+
scoop install supermodel
97+
98+
- name: Smoke test
99+
shell: bash
100+
run: |
101+
VERSION="${GITHUB_REF_NAME#v}"
102+
supermodel --version
103+
supermodel --version | grep -F "$VERSION"
104+
supermodel --help
105+
echo "✓ smoke test passed on ${{ matrix.name }}"

0 commit comments

Comments
 (0)