Skip to content

Commit

Permalink
chore: Add update-check to the CI smoke test.
Browse files Browse the repository at this point in the history
We run this for all our release binaries.
  • Loading branch information
iphydf committed Jan 4, 2025
1 parent ac59234 commit 9c2d141
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
7 changes: 5 additions & 2 deletions .ci-scripts/version-regex.sh → .ci-scripts/smoke-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ set -eux -o pipefail
if [ -n "$(echo "$GITHUB_REF" | grep -o 'refs/tags/v.*')" ] ||
[ -n "$(git tag --points-at HEAD | grep '^v.*')" ] ||
[ -n "$(git log -1 --pretty=%B | grep '^chore: Release v.*')" ]; then
echo "regex=qTox v.* (stable)" >>"$GITHUB_OUTPUT"
REGEX="qTox v.* (stable)"
else
echo "regex=qTox v.* (unstable)" >>"$GITHUB_OUTPUT"
REGEX="qTox v.* (unstable)"
fi

"$@" --version | grep "$REGEX" || ("$@" --version && false)
"$@" --update-check
21 changes: 4 additions & 17 deletions .github/workflows/build-test-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,10 @@ jobs:
name: qTox-${{ github.sha }}-x86_64-AppImage
- name: Install AppImage dependencies
run: sudo apt-get install -y fuse xvfb
- name: Determine whether we expect to be stable
id: expectation
run: .ci-scripts/version-regex.sh
- name: Run AppImage
run: |
chmod +x qTox-*.AppImage
xvfb-run --auto-servernum ./qTox-*.AppImage --version | grep '${{ steps.expectation.outputs.regex }}' || (xvfb-run --auto-servernum ./qTox-*.AppImage --version && false)
.ci-scripts/smoke-test.sh xvfb-run --auto-servernum ./qTox-*.AppImage
build-android:
name: Android
Expand Down Expand Up @@ -504,11 +501,8 @@ jobs:
flatpak install --user -y --noninteractive flathub org.kde.Platform/x86_64/6.7
- name: Install flatpak
run: flatpak install --user -y --bundle qtox.flatpak
- name: Determine whether we expect to be stable
id: expectation
run: .ci-scripts/version-regex.sh
- name: Run flatpak
run: flatpak run io.github.qtox.qTox --version | grep '${{ steps.expectation.outputs.regex }}' || (flatpak run io.github.qtox.qTox --version && false)
run: .ci-scripts/smoke-test.sh flatpak run io.github.qtox.qTox
env:
QT_QPA_PLATFORM: offscreen

Expand Down Expand Up @@ -626,11 +620,8 @@ jobs:
run: brew install 7zip
- name: Unpack dmg
run: 7zz x qTox.dmg qtox.app
- name: Determine whether we expect to be stable
id: expectation
run: .ci-scripts/version-regex.sh
- name: Run qTox
run: qtox.app/Contents/MacOS/qTox --version | grep '${{ steps.expectation.outputs.regex }}' || (qtox.app/Contents/MacOS/qTox --version && false)
run: .ci-scripts/smoke-test.sh qtox.app/Contents/MacOS/qTox

build-macos-user:
name: macOS user
Expand Down Expand Up @@ -767,13 +758,9 @@ jobs:
run: choco install -y 7zip
- name: Unpack exe
run: 7z x setup-qtox.exe -oqtox
- name: Determine whether we expect to be stable
id: expectation
shell: bash
run: .ci-scripts/version-regex.sh
- name: Run qTox
shell: bash
run: qtox/bin/qtox.exe --version | grep '${{ steps.expectation.outputs.regex }}' || (qtox/bin/qtox.exe --version && false)
run: .ci-scripts/smoke-test.sh qtox/bin/qtox.exe

################################################################################################
# Documentation/website jobs
Expand Down

0 comments on commit 9c2d141

Please sign in to comment.