Wait for /dev/ubuntu/disk device to start snap-initramfs-mounts.service #434
Workflow file for this run
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
name: Spread tests | |
on: | |
schedule: | |
# Weekly sunday testing for bitrot | |
- cron: '0 12 * * 0' | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-snapd-deb: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: 'valentindavid/snapd' | |
path: snapd | |
ref: 'valentindavid/udev-scan-disk' | |
- name: Build snapd deb | |
working-directory: '${{ github.workspace }}/snapd' | |
run: | | |
sudo apt update | |
sudo DEBIAN_FRONTEND=noninteractive apt build-dep -yqq --no-install-recommends ./ | |
bash get-deps.sh | |
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: snapd | |
path: "${{ github.workspace }}/snapd_*.deb" | |
build: | |
runs-on: self-hosted | |
needs: build-snapd-deb | |
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: snapd | |
- name: Build snap | |
run: | | |
spread -artifacts=./artifacts google-nested:tests/spread/build/ | |
find ./artifacts -type f -name "*.artifact" -exec cp {} "${{ github.workspace }}" \; | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: snaps | |
path: "${{ github.workspace }}/*.artifact" | |
- 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 | |
tests-main: | |
runs-on: self-hosted | |
needs: | |
- build | |
- build-snapd-deb | |
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: snapd | |
- uses: actions/download-artifact@v2 | |
with: | |
name: snaps | |
- 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 | |
tests-snapd: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- build-snapd-deb | |
steps: | |
- name: Cleanup job workspace | |
id: cleanup-job-workspace | |
run: | | |
rm -rf "${{ github.workspace }}" | |
mkdir "${{ github.workspace }}" | |
- uses: actions/checkout@v2 | |
with: | |
path: core-initrd | |
- uses: actions/checkout@v2 | |
with: | |
repository: 'valentindavid/snapd' | |
path: snapd | |
ref: 'valentindavid/udev-scan-disk' | |
- uses: actions/download-artifact@v2 | |
with: | |
name: snapd | |
- uses: actions/download-artifact@v2 | |
with: | |
name: snaps | |
- 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-initrd/tests/lib/prepare-utils.sh" | |
echo "************* INSTALLING DEPS *************" | |
install_core_initrd_deps '${{ github.workspace }}/core-initrd' '${{ github.workspace }}'/snapd_*.deb | |
echo "************* DOWNLOADING SNAPS *************" | |
download_core_initrd_snaps 'edge' | |
echo "************* PREPAREING CORE24 IMAGE *************" | |
rm -f "upstream-pc-kernel.snap" "upstream-pc-gadget.snap" | |
mv "pc-kernel.artifact" "upstream-pc-kernel.snap" | |
mv "pc-gadget.artifact" "upstream-pc-gadget.snap" | |
echo "************* BUILDING CORE24 IMAGE *************" | |
build_core24_image | |
echo "************* STARTING CORE24 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-24-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 | |