diff --git a/.github/workflows/ci-join-mainnet.yml b/.github/workflows/ci-join-mainnet.yml new file mode 100644 index 000000000..041349e9b --- /dev/null +++ b/.github/workflows/ci-join-mainnet.yml @@ -0,0 +1,42 @@ +name: join mainnet nightly +# Nightly action that tests joining mainnet as a full node. + +on: + workflow_dispatch: + schedule: + - cron: "0 1 * * 1-5" # Weekdays at 1am UTC + +permissions: + contents: read + pull-requests: read + +jobs: + join: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: 'stable' + + - name: Build binaries + uses: goreleaser/goreleaser-action@v5 + with: + version: 2 + args: release -f .goreleaser-snapshot.yaml --snapshot --clean --skip=archive + + - name: Build halovisor image + run: scripts/halovisor/build.sh "${GITHUB_SHA::7}" + + - name: Run join test + run: | + cd scripts/join + go test . -v --network=mainnet --integration --logs_file=docker_logs.txt -timeout 0 + + - name: Upload docker logs + uses: actions/upload-artifact@v4 + if: always() + with: + name: failed-logs + path: scripts/join/docker_logs.txt + retention-days: 3 diff --git a/.github/workflows/ci-join.yml b/.github/workflows/ci-join-omega.yml similarity index 84% rename from .github/workflows/ci-join.yml rename to .github/workflows/ci-join-omega.yml index 386cc5925..8fc55deee 100644 --- a/.github/workflows/ci-join.yml +++ b/.github/workflows/ci-join-omega.yml @@ -1,10 +1,11 @@ name: join omega nightly # Nightly action that tests joining omega as a full node. -on: - workflow_dispatch: - schedule: - - cron: "0 1 * * 1-5" # Weekdays at 1am UTC +# We temporarily disable this action because it fails and needs to be investigated +# on: +# workflow_dispatch: +# schedule: +# - cron: "0 1 * * 1-5" # Weekdays at 1am UTC permissions: contents: read diff --git a/scripts/join/join_test.go b/scripts/join/join_test.go index 1b3130069..37f28992e 100644 --- a/scripts/join/join_test.go +++ b/scripts/join/join_test.go @@ -30,14 +30,15 @@ import ( var ( logsFile = flag.String("logs_file", "join_test.log", "File to write docker logs to") + network = flag.String("network", "omega", "Network to join (default: omega)") integration = flag.Bool("integration", false, "Run integration tests") ) -// TestJoinOmega starts a local node (using omni operator init-nodes) +// TestJoinNetwork starts a local node (using omni operator init-nodes) // and waits for it to sync. // //nolint:paralleltest // Parallel tests not supported since we start docker containers. -func TestJoinOmega(t *testing.T) { +func TestJoinNetwork(t *testing.T) { if !*integration { t.Skip("skipping integration test") } @@ -47,7 +48,6 @@ func TestJoinOmega(t *testing.T) { minDuration = time.Minute * 30 ) - network := netconf.Omega ctx, cancel := context.WithCancel(context.Background()) defer cancel() home := t.TempDir() @@ -57,7 +57,7 @@ func TestJoinOmega(t *testing.T) { require.NoError(t, err) cfg := clicmd.InitConfig{ - Network: network, + Network: netconf.ID(*network), Home: home, Moniker: t.Name(), HaloTag: getGitCommit7(t),