Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add update-check to the CI smoke test. #377

Merged
merged 1 commit into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading