From da60bb92dfebcde487bb396529f4c99d8d928ace Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Sun, 6 Aug 2023 10:08:20 +1000 Subject: [PATCH] fix: integration tests (hopefully) --- .github/workflows/ci.yml | 2 +- bin/.ktfmt-0.44.pkg | 1 + bin/ktfmt | 1 + bin/packages/ktfmt.hcl | 32 ++++++++++++++++++++++++++++++++ bin/packages/ktfmt/ktfmt.sh | 4 ++++ scripts/integration-tests | 4 ++-- 6 files changed, 41 insertions(+), 3 deletions(-) create mode 120000 bin/.ktfmt-0.44.pkg create mode 120000 bin/ktfmt create mode 100644 bin/packages/ktfmt.hcl create mode 100755 bin/packages/ktfmt/ktfmt.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9881967c95..da8ee9185b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: run: shellcheck -e SC2016 scripts/* integration: name: Integration tests - if: startsWith(github.ref, 'refs/heads/gh-readonly-queue/') || github.ref == 'refs/heads/main' +# if: startsWith(github.ref, 'refs/heads/gh-readonly-queue/') || github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/bin/.ktfmt-0.44.pkg b/bin/.ktfmt-0.44.pkg new file mode 120000 index 0000000000..383f4511d4 --- /dev/null +++ b/bin/.ktfmt-0.44.pkg @@ -0,0 +1 @@ +hermit \ No newline at end of file diff --git a/bin/ktfmt b/bin/ktfmt new file mode 120000 index 0000000000..680bd7ae73 --- /dev/null +++ b/bin/ktfmt @@ -0,0 +1 @@ +.ktfmt-0.44.pkg \ No newline at end of file diff --git a/bin/packages/ktfmt.hcl b/bin/packages/ktfmt.hcl new file mode 100644 index 0000000000..6fa9373493 --- /dev/null +++ b/bin/packages/ktfmt.hcl @@ -0,0 +1,32 @@ +description = "ktfmt is a program that pretty-prints (formats) Kotlin code, based on google-java-format." +binaries = ["ktfmt"] +source = "https://repo1.maven.org/maven2/com/facebook/ktfmt/${version}/ktfmt-${version}-jar-with-dependencies.jar" +dont-extract = true + +on "unpack" { + rename { + from = "${root}/ktfmt-${version}-jar-with-dependencies.jar" + to = "${root}/ktfmt.jar" + } + + copy { + from = "ktfmt/ktfmt.sh" + to = "${root}/ktfmt" + mode = 448 + } +} + +version "0.41" "0.40" "0.39" "0.42" "0.43" "0.44" { + auto-version { + github-release = "facebook/ktfmt" + } +} + +sha256sums = { + "https://repo1.maven.org/maven2/com/facebook/ktfmt/0.39/ktfmt-0.39-jar-with-dependencies.jar": "72bd918f3e36c18561eefa7eba08221ae80086deccbaf81305710ec421041d8d", + "https://repo1.maven.org/maven2/com/facebook/ktfmt/0.40/ktfmt-0.40-jar-with-dependencies.jar": "d6ba1dc635b30dfab0203555d4ebcade78d537cb550402c820c44be43f64c8dd", + "https://repo1.maven.org/maven2/com/facebook/ktfmt/0.41/ktfmt-0.41-jar-with-dependencies.jar": "a763c2b24a7dfe3f270ebe652938cf76b1a13fec98b97589f2f788bd152a72d7", + "https://repo1.maven.org/maven2/com/facebook/ktfmt/0.42/ktfmt-0.42-jar-with-dependencies.jar": "67901bf2b267750f55422c2ce706224741000cf401f2f202d7070afd4d697a4d", + "https://repo1.maven.org/maven2/com/facebook/ktfmt/0.43/ktfmt-0.43-jar-with-dependencies.jar": "ed79f177ac714cf6cf7be4730a2ed061562f02bdb42bbf4bfa9ef2226d82ca45", + "https://repo1.maven.org/maven2/com/facebook/ktfmt/0.44/ktfmt-0.44-jar-with-dependencies.jar": "1d1823ea8943449e8205374fa5e458d9e665e14e4e19c949633f8e94439f919e", +} diff --git a/bin/packages/ktfmt/ktfmt.sh b/bin/packages/ktfmt/ktfmt.sh new file mode 100755 index 0000000000..7199e78d95 --- /dev/null +++ b/bin/packages/ktfmt/ktfmt.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +KTFMT_DIR="$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")" +exec java --add-opens java.base/java.lang=ALL-UNNAMED -Xmx512m -jar "${KTFMT_DIR}/ktfmt.jar" "$@" diff --git a/scripts/integration-tests b/scripts/integration-tests index 74cbe55cb6..fa5b55e25f 100755 --- a/scripts/integration-tests +++ b/scripts/integration-tests @@ -35,8 +35,8 @@ wait_for() { start_cluster() { info "Starting cluster" - overmind start -D - overmind echo & + overmind start & + sleep 60 wait_for "cluster to become ready" "ftl status" trap "overmind quit" EXIT INT TERM }