Daily #294
This file contains hidden or 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: Daily | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| api-tests: | |
| name: Operations Center End-to-End System Tests | |
| strategy: | |
| fail-fast: false | |
| timeout-minutes: 181 | |
| runs-on: | |
| - self-hosted | |
| - arch-amd64 | |
| - futurfusion-operations-center-daily | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 'stable' | |
| - name: Setup Incus | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| run: | | |
| sudo apt install -y linux-headers-$(uname -r) | |
| sudo --preserve-env=DEBIAN_FRONTEND apt install -y curl jq make build-essential systemd-timesyncd unzip zfsutils-linux | |
| sudo systemctl enable systemd-timesyncd | |
| sudo systemctl restart systemd-timesyncd | |
| curl https://pkgs.zabbly.com/get/incus-stable | sudo sh | |
| sudo chmod 666 /var/lib/incus/unix.socket | |
| echo "initializing incus with zfs backend and 200MB loop device" | |
| incus admin init --auto --storage-backend=zfs --storage-create-loop=200 | |
| incus remote generate-certificate | |
| echo "setting zfs sync to disabled for better performance in CI environment" | |
| sudo zfs set sync=disabled default | |
| - name: Install opentofu | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -fsSL https://get.opentofu.org/install-opentofu.sh -o install-opentofu.sh | |
| chmod +x install-opentofu.sh | |
| sudo ./install-opentofu.sh --install-method deb | |
| rm -f install-opentofu.sh | |
| tofu -version | |
| - name: Build binaries | |
| run: | | |
| go version | |
| mkdir -p ./bin | |
| CGO_ENABLED=0 GOARCH=amd64 go build -o ./bin/operations-center.linux.amd64 ./cmd/operations-center | |
| go build -o ./bin/operations-centerd ./cmd/operations-centerd | |
| - name: Run End-to-End Tests | |
| env: | |
| FLAKY_SKIP_ON_FAIL: "true" | |
| OPERATIONS_CENTER_E2E_TEST: "true" | |
| OPERATIONS_CENTER_E2E_TEST_CONCURRENT_SETUP: "true" | |
| OPERATIONS_CENTER_E2E_TEST_TMP_DIR: "${{ github.workspace }}/tmp-e2e" | |
| run: | | |
| set -o pipefail | |
| mkdir -p ${OPERATIONS_CENTER_E2E_TEST_TMP_DIR} | |
| go test -v ./e2e_tests -timeout 180m | tee ${OPERATIONS_CENTER_E2E_TEST_TMP_DIR}/e2e_tests.out | |
| - name: Show logs on failure | |
| if: failure() | |
| env: | |
| OPERATIONS_CENTER_E2E_TEST_TMP_DIR: "${{ github.workspace }}/tmp-e2e" | |
| run: | | |
| cat ${OPERATIONS_CENTER_E2E_TEST_TMP_DIR}/e2e_tests.out || true | |
| echo | |
| echo "===[ DEBUG OUTPUT ]===" | |
| cat ${OPERATIONS_CENTER_E2E_TEST_TMP_DIR}/*.log || true | |
| exit 1 |