Skip to content

Commit 53349d4

Browse files
MikeNeilsonzack-rmarma-rripkendependabot[bot]krowvin
authored
Update test branch (#1538)
Pull in latest changes to develop since the last time we did this. NOTE: I'm pretty sure this is everything, but it's a lot to keep track of so is possible I've missed something. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Zack Olson <zack@rmanet.com> Co-authored-by: Ryan Ripken <89810919+rma-rripken@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charles Graham <charles.r.graham@usace.army.mil> Co-authored-by: Bryson Spilman <87150647+rma-bryson@users.noreply.github.com> Co-authored-by: rma-kayla <kayla@rmanet.com> Co-authored-by: Ryan Miles <ryanm@rmanet.com> Co-authored-by: Adam Korynta <47677856+adamkorynta@users.noreply.github.com> Co-authored-by: Bryson Spilman <bryson@rmanet.com> Co-authored-by: Daniel Osborne <Daniel.T.Osborne@usace.army.mil>
1 parent e7f7ca3 commit 53349d4

327 files changed

Lines changed: 11349 additions & 3902 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,20 @@ jobs:
1515
matrix:
1616
jdk: [11]
1717
schema:
18-
- "ghcr.io/hydrologicengineeringcenter/cwms-database/cwms/database-ready-ora-23.5:latest-dev"
19-
- "ghcr.io/hydrologicengineeringcenter/cwms-database/cwms/database-ready-ora-23.5:25-07-01-RC06"
20-
name: build and test
18+
- env: latest
19+
image: "ghcr.io/hydrologicengineeringcenter/cwms-database/cwms/database-ready-ora-23.5:latest-dev"
20+
- env: release
21+
image: "ghcr.io/hydrologicengineeringcenter/cwms-database/cwms/database-ready-ora-23.5:25.07.01"
22+
name: build and test (jdk ${{matrix.jdk}}, schema ${{matrix.schema.env}})
2123
runs-on: ubuntu-latest
2224
outputs:
2325
thewar: ${{steps.thebuild.outputs.WARFILE}}
2426
steps:
27+
- name: Clean up disk space, so we don't run out.
28+
run: |
29+
sudo rm -rf /usr/share/dotnet
30+
sudo rm -rf /usr/local/lib/android
31+
sudo rm -rf /opt/ghc
2532
- name: checkout code
2633
uses: actions/checkout@v5.0.0
2734
- name: setup java
@@ -30,30 +37,43 @@ jobs:
3037
distribution: 'temurin'
3138
java-version: ${{matrix.jdk}}
3239
cache: 'gradle'
33-
- name: install node for cda-gui audit
34-
uses: actions/setup-node@v4
35-
with:
36-
node-version: '22'
37-
cache: 'npm'
38-
cache-dependency-path: cda-gui/package-lock.json
39-
40-
- name: run cda-gui audit for high CVE
41-
working-directory: ./cda-gui
42-
run: |
43-
npm install --package-lock-only
44-
npm audit --audit-level=high
4540
- name: build and test
4641
id: thebuild
47-
run: ./gradlew build --info --init-script init.gradle
42+
run: ./gradlew clean build --info --init-script init.gradle
4843
- name: integration tests
49-
run: ./gradlew integrationtest --info --init-script init.gradle -PCDA.oracle.database.image=${{matrix.schema}}
44+
run: ./gradlew integrationtest --info --init-script init.gradle -PCDA.oracle.database.image=${{matrix.schema.image}}
5045
- name: Publish Test Report
5146
uses: mikepenz/action-junit-report@v5
5247
if: success() || failure() # always run even if the previous step fails
5348
with:
5449
annotate_only: true
5550
include_passed: true
5651
report_paths: '**/TEST-*.xml'
52+
open-api-static-analysis:
53+
name: OpenApi Static Analysis Tests
54+
runs-on: ubuntu-latest
55+
env:
56+
OPEN_API_TEST: "true"
57+
steps:
58+
- name: checkout code
59+
uses: actions/checkout@v5.0.0
60+
- name: setup java
61+
uses: actions/setup-java@v5.0.0
62+
with:
63+
distribution: 'temurin'
64+
java-version: 11
65+
cache: 'gradle'
66+
- name: build and test
67+
id: thebuild
68+
run: ./gradlew clean :cwms-data-api:test --tests "cwms.cda.api.OpenApiDocTest" --info --init-script init.gradle
69+
- name: Publish Test Report
70+
uses: mikepenz/action-junit-report@v5
71+
if: always()
72+
with:
73+
annotate_only: true
74+
include_passed: true
75+
report_paths: '**/TEST-*.xml'
76+
detailed_summary: true
5777
build-docker-image:
5878
runs-on: ubuntu-latest
5979
steps:

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ jobs:
5050
api_image: ${{steps.set_image.outputs.api_image}}
5151
migration_image: ${{steps.migration-publish.outputs.image}}
5252
steps:
53+
- name: Clean up disk space, so we don't run out.
54+
if: matrix.platform == 'ubuntu-latest'
55+
run: |
56+
sudo rm -rf /usr/share/dotnet
57+
sudo rm -rf /usr/local/lib/android
58+
sudo rm -rf /opt/ghc
5359
- name: checkout code
5460
uses: actions/checkout@v5.0.0
5561
with:
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CDA Web GUI NPM Audit (CVE)
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
pull_request:
8+
branches:
9+
- develop
10+
# Only run when relevant files change (i.e. packages are bumped into new NPM versions)
11+
paths:
12+
- "cda-gui/**"
13+
- ".github/workflows/web-gui-*.yml"
14+
15+
# Allow running audits adhoc via "run task" in the UI
16+
workflow_dispatch:
17+
18+
jobs:
19+
audit:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: install node for cda-gui audit
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '22'
29+
cache: 'npm'
30+
cache-dependency-path: cda-gui/package-lock.json
31+
32+
- name: run cda-gui audit for critical CVE
33+
working-directory: ./cda-gui
34+
# disable husky git hooks during CI runs
35+
run: |
36+
HUSKY=0 npm ci
37+
npm audit --audit-level=critical

.readthedocs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ build:
1010
# Build documentation in the "docs/" directory with Sphinx
1111
sphinx:
1212
configuration: docs/source/conf.py
13+
fail_on_warning: true
1314
# Optionally, but recommended,
1415
# declare the Python requirements required to build your documentation
1516
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ RUN apk --no-cache upgrade && \
2424

2525
RUN mkdir /download && \
2626
cd /download && \
27-
wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.105/bin/apache-tomcat-9.0.105.tar.gz && \
28-
echo "904f10378ee2c7c68529edfefcba50c77eb677aa4586cfac0603e44703b0278f71f683b0295774f3cdcb027229d146490ef2c8868d8c2b5a631cf3db61ff9956 *apache-tomcat-9.0.105.tar.gz" > checksum.txt && \
27+
wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.112/bin/apache-tomcat-9.0.112.tar.gz && \
28+
echo "fc55589f28bf6659928167461c741649b6005b64285dd81df05bb5ee40f4c6de59b8ee3af84ff756ae1513fc47f5f73070e29313b555e27f096f25881c69841d *apache-tomcat-9.0.112.tar.gz" > checksum.txt && \
2929
sha512sum -c checksum.txt && \
3030
tar xzf apache-tomcat-*tar.gz && \
31-
mv apache-tomcat-9.0.105 /usr/local/tomcat/ && \
31+
mv apache-tomcat-9.0.112 /usr/local/tomcat/ && \
3232
cd / && \
3333
rm -rf /download && \
3434
rm -rf /usr/local/tomcat/webapps/* && \

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ This is a new implementation of a REST API for data retrieval of USACE Water Dat
3838

3939
See the [📃 Wiki](https://github.com/USACE/cwms-data-api/wiki) for how to get started
4040

41+
End user documentation available here: [📕 Read the Docs](https://cwms-data-api.readthedocs.io/latest)
4142

4243
## Development notes
4344

44-
Development and runtime currently requires java 8.
45+
Development and runtime currently requires java 11. JDKs and JREs greater than 11 should work, please report if they don't.
4546

4647

4748
To build the war:
@@ -52,7 +53,7 @@ This will compile the jar and run the basic unit tests.
5253

5354
## Development stack
5455

55-
See the README.docker-compose.md for instructions using the docker-compose environment
56+
See the docker-compose.README.md for instructions using the docker-compose environment
5657

5758
## Testing
5859

0 commit comments

Comments
 (0)