diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9cd26692038e046444caa356db20fafd4570791d..1670e7a053455eda7fc4b208e9a53160f44681c2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -232,6 +232,7 @@ NSHM Tests: matrix: - NSHM: Alaska2007 - NSHM: Alaska2023 + - NSHM: WebAlaska2023 - NSHM: Conus2018 - NSHM: Conus2023 - NSHM: Hawaii2021 diff --git a/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java b/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java index ce86c0db5ab3e5ffd93549f9034b2e48bbd0bb52..2304709e0ef1a1908a77fa809918fd0b32dc3060 100644 --- a/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java +++ b/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java @@ -114,6 +114,28 @@ class NshmTestUtils { context.close(); } + /** + * Test a NSHM. + * + * @param nshm The NSHM to test + * @throws ExecutionException + * @throws InterruptedException + */ + static void testWebNshm(Nshm nshm, Optional<Path> dataPath) + throws InterruptedException, ExecutionException { + var context = Micronaut + .build("--model=nshms/" + String.format("%s-%s", nshm.nshmInfo.repo, nshm.nshmInfo.year)) + .mainClass(Application.class) + .start(); + + for (NamedLocation location : nshm.locations()) { + LOGGER.info("Location: " + location.toString()); + compareWebCurves(nshm, location, dataPath); + } + + context.close(); + } + /** * Write expected values * diff --git a/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTests.java b/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTests.java index 14948d778d12db7aa8e45bdbef8a04841ed1f8fd..928bf90d18f47c28bb64303f7db5b29ce8867896 100644 --- a/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTests.java +++ b/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTests.java @@ -149,6 +149,19 @@ class NshmTests { NshmTestUtils.testNshm(nshm, getDataPath(nshm)); } + /** + * Test Alaska 2023 NSHM + * + * To run test: ./gradlew testWebAlaska2023 + * @throws ExecutionException + * @throws InterruptedException + */ + @Test + final void testWebAlaska2023() throws IOException, InterruptedException, ExecutionException { + Nshm nshm = NSHMS.get("nshm-alaska-2023"); + NshmTestUtils.testWebNshm(nshm, getDataPath(nshm)); + } + /** * Test CONUS 2018 NSHM *