Skip to content

Commit d31117d

Browse files
committed
chore: test deb
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent 101f218 commit d31117d

File tree

2 files changed

+46
-6
lines changed

2 files changed

+46
-6
lines changed

.github/workflows/canary-deb.yaml

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,57 @@ jobs:
4242
- name: Clean ubuntu runner workspace
4343
run: |
4444
rm -rf ${{ github.workspace }}/*
45+
- name: Install Finch deps
46+
run: |
47+
sudo apt-get update
48+
sudo apt install build-essential -y
49+
sudo apt install libseccomp-dev -y
50+
sudo apt install pkg-config -y
51+
sudo apt install zlib1g-dev -y
52+
- name: Add Finch APT Repository
53+
run: |
54+
# Detect system architecture
55+
ARCH=$(dpkg --print-architecture)
56+
echo "Detected architecture: $ARCH"
57+
58+
# Download and install GPG key
59+
curl -fsSL https://artifact.runfinch.com/deb/GPG_KEY.pub | sudo gpg --dearmor -o /usr/share/keyrings/runfinch-finch-archive-keyring.gpg
60+
61+
# Add repository with detected architecture
62+
echo "deb [signed-by=/usr/share/keyrings/runfinch-finch-archive-keyring.gpg arch=$ARCH] https://artifact.runfinch.com/deb noble main" | sudo tee /etc/apt/sources.list.d/runfinch-finch.list
63+
64+
# Update package lists
65+
sudo apt update
66+
67+
- name: Prepare clean environment for Finch
68+
run: |
69+
# Remove any existing container runtimes that might conflict
70+
sudo apt remove containerd containerd.io docker.io docker-ce docker-ce-cli runc -y || true
71+
sudo apt autoremove -y
72+
4573
- name: Install Finch with APT
4674
run: |
4775
sudo apt install runfinch-finch -y
48-
- name: Verify version
76+
- name: Verify version matches latest release
4977
run: |
50-
version=$(finch -v)
51-
if [[ $version == "finch version ${{inputs.ref_name}}" ]]; then
52-
echo "Version matches: $version"
78+
# Get the latest tag from the repository
79+
LATEST_TAG=$(git ls-remote --tags --sort=-version:refname https://github.com/runfinch/finch.git | head -n1 | cut -d/ -f3)
80+
echo "Latest repository tag: $LATEST_TAG"
81+
82+
# Get installed Finch version
83+
INSTALLED_VERSION=$(finch -v)
84+
echo "Installed Finch version: $INSTALLED_VERSION"
85+
86+
# Compare versions
87+
EXPECTED_VERSION="finch version $LATEST_TAG"
88+
if [[ "$INSTALLED_VERSION" == "$EXPECTED_VERSION" ]]; then
89+
echo "✅ Version matches: $INSTALLED_VERSION"
5390
else
54-
echo "Version mismatch. Found: $version, Expected: ${{inputs.ref_name}}"
91+
echo "❌ Version mismatch!"
92+
echo " Expected: $EXPECTED_VERSION"
93+
echo " Found: $INSTALLED_VERSION"
5594
exit 1
5695
fi
5796
- name: Clean up environment
5897
run: |
59-
sudo apt remove runfinch-finch -y
98+
sudo apt remove runfinch-finch -y

cmd/finch/virtual_machine_settings_darwin_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func TestNewSettingsMCommand(t *testing.T) {
2626
assert.Equal(t, cmd.Name(), "settings")
2727
}
2828

29+
// testing the deb workflow
2930
func TestSettingsVMAction_runAdapter(t *testing.T) {
3031
t.Parallel()
3132

0 commit comments

Comments
 (0)