Skip to content

workflows: add snap_store_integration_tests to handle snap store downloads and testing#161

Open
Sinan-Karakaya wants to merge 8 commits intomainfrom
sinan/test-snap-from-snap-store
Open

workflows: add snap_store_integration_tests to handle snap store downloads and testing#161
Sinan-Karakaya wants to merge 8 commits intomainfrom
sinan/test-snap-from-snap-store

Conversation

@Sinan-Karakaya
Copy link
Copy Markdown
Contributor

This PR closes #142.

  • Added snap_store_integration_tests.yml to handle testing the snap store version of fpgad on a specific channel, on a specific CID
  • Modified test_snap_device_script.sh to handle installing snaps from a local snap file, or by reading snap_channel.txt and download fpgad from the snapstore

@Sinan-Karakaya Sinan-Karakaya self-assigned this Mar 25, 2026
Copilot AI review requested due to automatic review settings March 25, 2026 13:13
@github-actions github-actions bot requested a review from talhaHavadar March 25, 2026 13:13
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new GitHub Actions workflow to run snap-store integration tests on a device-under-test (DUT) via Testflinger, and updates the DUT device script to support installing fpgad either from an attached local .snap or directly from the Snap Store.

Changes:

  • Added a workflow_dispatch workflow to run store-snap integration tests on a selected Testflinger queue/channel.
  • Added an integration test workflow that builds the snap and runs DUT tests (new workflow file).
  • Updated the DUT device script to install fpgad from either ./fpgad.snap or the Snap Store channel from snap_channel.txt.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/snap_store_integration_tests.yml New workflow to install from Snap Store channel and run DUT integration tests via Testflinger.
.github/workflows/integration_tests.yml New workflow to run binary + snap integration tests via Testflinger (includes snap build + download).
.github/testflinger-assets/test_snap_device_script.sh Updates DUT provisioning to install fpgad from a local snap or from a store channel.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Sinan-Karakaya Sinan-Karakaya force-pushed the sinan/test-snap-from-snap-store branch 3 times, most recently from 2da0a68 to 8d3afc1 Compare March 25, 2026 13:34
Copy link
Copy Markdown
Collaborator

@artiepoole artiepoole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in principle, just want to discuss options first

Copy link
Copy Markdown
Collaborator

@artiepoole artiepoole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this approach a lot more, thanks! I just have one change to make it easier to follow, and one question I answered myself - keeping for clarity later.

Copy link
Copy Markdown
Collaborator

@artiepoole artiepoole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry spotted this based on the failed run

@Sinan-Karakaya Sinan-Karakaya force-pushed the sinan/test-snap-from-snap-store branch 2 times, most recently from 4eb5644 to 4dbb1ba Compare March 25, 2026 16:00
Copy link
Copy Markdown
Collaborator

@artiepoole artiepoole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks very much Sinan. Please wait for @talhaHavadar to review before merging :)

@Sinan-Karakaya Sinan-Karakaya force-pushed the sinan/test-snap-from-snap-store branch from 4dbb1ba to 8f26a16 Compare March 25, 2026 16:27
@artiepoole artiepoole self-requested a review March 26, 2026 10:08
@Sinan-Karakaya Sinan-Karakaya force-pushed the sinan/test-snap-from-snap-store branch from 73ca6a0 to bc9cba7 Compare March 26, 2026 14:19
@Sinan-Karakaya Sinan-Karakaya force-pushed the sinan/test-snap-from-snap-store branch from bc9cba7 to c055051 Compare March 26, 2026 14:27
@artiepoole artiepoole changed the title CI: added snap_store_integration_tests to handle snap store downloads and testing workflows: add snap_store_integration_tests to handle snap store downloads and testing Mar 26, 2026
@Sinan-Karakaya Sinan-Karakaya force-pushed the sinan/test-snap-from-snap-store branch from c055051 to 638a290 Compare March 30, 2026 08:21
artiepoole
artiepoole previously approved these changes Mar 31, 2026
Copy link
Copy Markdown
Collaborator

@artiepoole artiepoole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks again Sinan!

Rename integration_tests.yaml.yml to integration_tets.yml

Signed-off-by: Sinan KARAKAYA <sinan.karakaya@canonical.com>
…ller

Add a manual workflow to run snap store channel tests via testflinger.
Update DUT install logic to support local snap and store-channel installs.

Signed-off-by: Sinan KARAKAYA <sinan.karakaya@canonical.com>
@github-actions github-actions bot requested a review from talhaHavadar March 31, 2026 14:18
Created snap_integration_tests.yml to unify the snap jobs, making integration_tests.yml lighter
The new snap integration tests can handle both local snaps and snapstore snaps

Signed-off-by: Sinan KARAKAYA <sinan.karakaya.canonical.com>
In snap_integration_tests.yml, merged snap_test_source and snap_channel inputs to support both
snap store channels, and local builds.

Signed-off-by: Sinan KARAKAYA <sinan.karakaya.canonical.com>
Moved ROOT_DIR to env to remove the need for creating a shell variable.
Made path construction use strenv inside yq

Signed-off-by: Sinan KARAKAYA <sinan.karakaya.canonical.com>
Replaced snap_channel.txt by SNAP_TEST_SOURCE environment variable.
SNAP_TEST_SOURCE is initialized during the CI, and set to the value of the workflow input.
Refactored testflinger_job.yaml to execute and source SNAP_TEST_SOURCE if env_setup.sh is present.
Refactored test_snap_device_script.sh to use environment variables instead of text input.

Signed-off-by: Sinan KARAKAYA <sinan.karakaya.canonical.com>
@Sinan-Karakaya Sinan-Karakaya force-pushed the sinan/test-snap-from-snap-store branch from aa92fa7 to 8731960 Compare March 31, 2026 14:21
Add workflow_dispatch to allow manual execution of the integration tests via the GitHub Actions UI.

Signed-off-by: Sinan KARAKAYA <sinan.karakaya@canonical.com>
@Sinan-Karakaya Sinan-Karakaya force-pushed the sinan/test-snap-from-snap-store branch from 8731960 to 6bb8a3e Compare March 31, 2026 14:49
@github-actions github-actions bot requested a review from talhaHavadar April 15, 2026 07:25
@Sinan-Karakaya Sinan-Karakaya force-pushed the sinan/test-snap-from-snap-store branch from 5e630cf to 6a75dcb Compare April 15, 2026 08:03
talhaHavadar
talhaHavadar previously approved these changes Apr 15, 2026
Copy link
Copy Markdown
Collaborator

@talhaHavadar talhaHavadar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good thank you Sinan, we can merge this once CI is green

Add export to SNAP_TEST_SOURCE and SNAP_CHANNEL in env_setup.sh to ensure
they are available to subprocesses. Remove the explicit sourcing of env_setup.sh
from test_snap_device_script.sh.

Signed-off-by: Sinan KARAKAYA <sinan.karakaya@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests: The store snap is not tested on device - autoconnection not tested etc

4 participants