-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Otherwise we might end up merging things that depend on fixes of snapd that are not released.
- Loading branch information
1 parent
bb8b566
commit 49100f1
Showing
4 changed files
with
125 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Tests snapd workflow | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
snapd_branch: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
tests-main: | ||
runs-on: self-hosted | ||
env: | ||
SNAP_BRANCH: ${{ inputs.snapd_branch }} | ||
steps: | ||
- name: Cleanup job workspace | ||
id: cleanup-job-workspace | ||
run: | | ||
rm -rf "${{ github.workspace }}" | ||
mkdir "${{ github.workspace }}" | ||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: core-snap | ||
path: "${{ github.workspace }}/core22.artifact" | ||
|
||
- name: Run tests | ||
run: | | ||
spread google-nested:tests/spread/main/ | ||
- name: Discard spread workers | ||
if: always() | ||
run: | | ||
shopt -s nullglob | ||
for r in .spread-reuse.*.yaml; do | ||
spread -discard -reuse-pid="$(echo "$r" | grep -o -E '[0-9]+')" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Tests snapd workflow | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
snapd_branch: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
tests-snapd: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cleanup job workspace | ||
id: cleanup-job-workspace | ||
run: | | ||
rm -rf "${{ github.workspace }}" | ||
mkdir "${{ github.workspace }}" | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: core-base | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: 'snapcore/snapd' | ||
path: snapd | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: core-snap | ||
|
||
- name: Install spread | ||
run: curl -s https://storage.googleapis.com/snapd-spread-tests/spread/spread-amd64.tar.gz | sudo tar xzv -C /usr/bin | ||
|
||
- name: Build image | ||
working-directory: '${{ github.workspace }}' | ||
run: | | ||
. "core-base/tests/lib/prepare-utils.sh" | ||
echo "************* INSTALLING DEPS *************" | ||
install_core22_deps | ||
echo "************* DOWNLOADING SNAPS *************" | ||
download_core22_snaps ${{ inputs.snapd_branch }} | ||
echo "************* WRITING CLOUD-INIT CONFIG *************" | ||
prepare_core22_cloudinit | ||
echo "************* BUILDING CORE22 IMAGE *************" | ||
uc_snap="$(get_core_snap_name)" | ||
mv core22.artifact "$uc_snap" | ||
build_core22_image | ||
echo "************* STARTING CORE22 VM *************" | ||
start_snapd_core_vm '${{ github.workspace }}' | ||
cd snapd | ||
# add any test suites that should be tested here | ||
SPREAD_EXTERNAL_ADDRESS=localhost:8022 spread external:ubuntu-core-22-64:tests/smoke/ | ||
- name: Discard spread workers | ||
if: always() | ||
run: | | ||
shopt -s nullglob | ||
for r in .spread-reuse.*.yaml; do | ||
spread -discard -reuse-pid="$(echo "$r" | grep -o -E '[0-9]+')" | ||
done | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters