From c22bf283473b40fdd9f6e060f96a93b3822ba9c0 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Fri, 9 May 2025 11:34:42 -0700 Subject: [PATCH] Add Google Search API keys --- .github/workflows/bld.yml | 4 +++- src/test/kotlin/net/thauvin/erik/mobibot/LocalProperties.kt | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index 8e7d939..37437fd 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -7,8 +7,10 @@ env: CHATGPT_API_KEY: ${{ secrets.CHATGPT_API_KEY }} CI_NAME: "GitHub CI" COVERAGE_JDK: "21" - COVERAGE_KOTLIN: "2.1.0" + COVERAGE_KOTLIN: "2.1.20" EXCHANGERATE_API_KEY: ${{ secrets.EXCHANGERATE_API_KEY }} + GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} + GOOGLE_CSE_CX: ${{ secrets.GOOGLE_CSE_CX }} KOTLIN_HOME: /usr/share/kotlinc MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }} MASTODON_HANDLE: ${{ secrets.MASTODON_HANDLE }} diff --git a/src/test/kotlin/net/thauvin/erik/mobibot/LocalProperties.kt b/src/test/kotlin/net/thauvin/erik/mobibot/LocalProperties.kt index 199ca1d..0f8ff42 100644 --- a/src/test/kotlin/net/thauvin/erik/mobibot/LocalProperties.kt +++ b/src/test/kotlin/net/thauvin/erik/mobibot/LocalProperties.kt @@ -46,7 +46,7 @@ open class LocalProperties { if (Files.exists(localPath)) { try { Files.newInputStream(localPath).use { stream -> localProps.load(stream) } - } catch (ignore: IOException) { + } catch (_: IOException) { // Do nothing } } @@ -59,7 +59,7 @@ open class LocalProperties { val ciName = System.getenv("CI_NAME") return ciName ?: try { InetAddress.getLocalHost().hostName - } catch (ignore: UnknownHostException) { + } catch (_: UnknownHostException) { "Unknown Host" } } @@ -72,7 +72,7 @@ open class LocalProperties { env?.let { localProps.setProperty(key, env) } - throw IOException("The $key property not found in local.properties or environment variables.") + env } }