From 589aa794b80a82f1ab1370bfc2a232b46d8f087b Mon Sep 17 00:00:00 2001 From: Max Asnaashari Date: Thu, 19 Sep 2024 17:46:20 +0000 Subject: [PATCH] .github/workflows: Remove tests Signed-off-by: Max Asnaashari --- .github/workflows/tests.yml | 169 ------------------------------------ 1 file changed, 169 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c67e2fd7f..cdfb6e1e8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -76,175 +76,6 @@ jobs: - name: Unit tests run: make check-unit - system-tests: - env: - DEBUG: "1" - SKIP_VM_LAUNCH: "1" - SNAPSHOT_RESTORE: "1" - name: System - runs-on: GitHubMicrocloud - strategy: - fail-fast: false - matrix: - go: ["1.22.x"] - suite: - - "add" - - "instances" - - "basic" - - "recover" - - "interactive" - - "mismatch" - - "preseed" - - steps: - - name: Performance tuning - run: | - set -eux - # optimize ext4 FSes for performance, not reliability - for fs in $(findmnt --noheading --type ext4 --list --uniq | awk '{print $1}'); do - # nombcache and data=writeback cannot be changed on remount - sudo mount -o remount,noatime,barrier=0,commit=6000 "${fs}" || true - done - - # disable dpkg from calling sync() - echo "force-unsafe-io" | sudo tee /etc/dpkg/dpkg.cfg.d/force-unsafe-io - - - name: Reclaim some space - run: | - set -eux - - sudo snap remove lxd --purge - # Purge older snap revisions that are disabled/superseded by newer revisions of the same snap - snap list --all | while read -r name _ rev _ _ notes _; do - [[ "${notes}" =~ disabled$ ]] && sudo snap remove "${name}" --revision "${rev}" --purge - done || true - - # This was inspired from https://github.com/easimon/maximize-build-space - df -h / - # dotnet - sudo rm -rf /usr/share/dotnet - # android - sudo rm -rf /usr/local/lib/android - # haskell - sudo rm -rf /opt/ghc - df -h / - - - name: Reclaim some memory - run: | - set -eux - - free -mt - sudo systemctl stop dpkg-db-backup.timer e2scrub_all.timer fstrim.timer logrotate.timer man-db.timer motd-news.timer phpsessionclean.timer update-notifier-download.timer update-notifier-motd.timer - sudo systemctl stop iscsid.socket multipathd.socket - sudo systemctl stop cron.service irqbalance.service mono-xsp4.service multipathd.service networkd-dispatcher.service php8.1-fpm.service - free -mt - - - name: Remove docker - run: | - set -eux - sudo apt-get autopurge -y containerd.io moby-containerd docker docker-ce podman uidmap - sudo ip link delete docker0 - sudo nft flush ruleset - - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Go (${{ matrix.go }}) - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go }} - - - name: Install dependencies - run: | - sudo add-apt-repository ppa:dqlite/dev -y --no-update - sudo apt-get update - sudo apt-get install --no-install-recommends -y libdqlite-dev pkg-config - - - name: Build - run: | - set -eux - - make - - # Binaries to sideload - export MICROCLOUD_DEBUG_PATH=~/go/bin/microcloud - export MICROCLOUDD_DEBUG_PATH=~/go/bin/microcloudd - - # strip debug binaries - strip -s "${MICROCLOUD_DEBUG_PATH}" "${MICROCLOUDD_DEBUG_PATH}" - - echo "MICROCLOUD_DEBUG_PATH=${MICROCLOUD_DEBUG_PATH}" >> "${GITHUB_ENV}" - echo "MICROCLOUDD_DEBUG_PATH=${MICROCLOUDD_DEBUG_PATH}" >> "${GITHUB_ENV}" - - - name: "Free up the ephemeral disk" - run: | - set -eux - - if ! mountpoint --quiet /mnt; then - echo "INFO: no ephemeral disk mounted on /mnt" - mount - exit 0 - fi - - # If the rootfs and the ephemeral part are on the same physical disk, giving the whole - # disk to microceph would wipe our rootfs. Since it is pretty rare for GitHub Action - # runners to have a single disk, we immediately bail rather than trying to gracefully - # handle it. Once snapd releases with https://github.com/snapcore/snapd/pull/13150, - # we will be able to stop worrying about that special case. - if [ "$(stat -c '%d' /)" = "$(stat -c '%d' /mnt)" ]; then - echo "FAIL: rootfs and ephemeral part on the same disk, aborting" - lsblk - blkid - sudo fdisk -l - exit 1 - fi - - # Free-up the ephemeral disk to use it as storage device for LXD. - sudo swapoff /mnt/swapfile - ephemeral_disk="$(findmnt --noheadings --output SOURCE --target /mnt | sed 's/[0-9]\+$//')" - sudo umount /mnt - sudo wipefs -a "${ephemeral_disk}" - export TEST_STORAGE_SOURCE="${ephemeral_disk}" - - echo "TEST_STORAGE_SOURCE=${TEST_STORAGE_SOURCE}" >> "${GITHUB_ENV}" - - - name: "Setup host LXD" - run: | - set -eux - sudo snap install lxd --channel latest/edge || sudo snap refresh lxd --channel latest/edge - sudo lxd init --auto - - - name: Build MicroOVN from commit 803dc03ea847d214941330c74cc0ae0027550dc0 - run: | - set -eux - - sudo snap refresh - sudo snap set lxd daemon.group=adm - sudo snap install snapcraft --classic - git clone https://github.com/canonical/microovn - cd microovn - git checkout 803dc03ea847d214941330c74cc0ae0027550dc0 - # disable golangci-lint as the latest version is not happy with this commit. - sed -e "s/golangci-lint run/# &/" -i snap/snapcraft.yaml - make microovn.snap - export MICROOVN_SNAP_PATH="$(readlink -f microovn.snap)" - echo "MICROOVN_SNAP_PATH=${MICROOVN_SNAP_PATH}" >> "${GITHUB_ENV}" - cd - - - - name: "Prepare for system tests" - run: | - set -eux - chmod +x ~ - cd test - sudo --preserve-env=DEBUG,GITHUB_ACTIONS,MICROCLOUD_DEBUG_PATH,MICROCLOUDD_DEBUG_PATH,SKIP_VM_LAUNCH,SNAPSHOT_RESTORE,TEST_STORAGE_SOURCE,TESTBED_READY,MICROOVN_SNAP_PATH ./main.sh setup - echo "TESTBED_READY=1" >> "${GITHUB_ENV}" - - - name: "Run system tests (${{ matrix.go }}, ${{ matrix.suite }})" - run: | - set -eux - chmod +x ~ - cd test - sudo --preserve-env=DEBUG,GITHUB_ACTIONS,MICROCLOUD_DEBUG_PATH,MICROCLOUDD_DEBUG_PATH,SKIP_VM_LAUNCH,SNAPSHOT_RESTORE,TEST_STORAGE_SOURCE,TESTBED_READY ./main.sh ${{ matrix.suite }} documentation-checks: uses: canonical/documentation-workflows/.github/workflows/documentation-checks.yaml@main