Skip to content

Commit

Permalink
Feature/update dependency (#40)
Browse files Browse the repository at this point in the history
* update dependency

* update workflow

* revert workflow

* add test step

* add snky step

* fix snyk step

* change java version

* revert java

* update dependency

* fix tests
  • Loading branch information
sliu008 authored Jan 21, 2025
1 parent 83089b3 commit 6c2faf6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 69 deletions.
76 changes: 11 additions & 65 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ jobs:
uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin' # Choose the Java distribution, e.g., Temurin (AdoptOpenJDK)
java-version: '11' # Specify the Java version
distribution: 'temurin'
java-version: '11'

- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-version: 6.3

#########################################################################
# Versioning (featuring weird gradle output work-arounds)
Expand Down Expand Up @@ -229,72 +231,16 @@ jobs:
./gradlew --scan buildArtifact
./gradlew shadowJar
mv build/libs/*.jar build/libs/footprint_${VERSION}.jar
ls -al
ls -al dist/
ls -al docker/
ls -al build/libs
ls -al terraform/
ls -al terraform_deploy/
#########################################################################
# Test
#########################################################################
# - name: SonarCloud Scan
# uses: sonarsource/sonarcloud-github-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# with:
# args: >
# -Dsonar.organization=${{ github.repository_owner }}
# -Dsonar.projectKey=${{ github.repository_owner }}_l2ss-py
# -Dsonar.python.coverage.reportPaths=build/reports/coverage.xml
# -Dsonar.sources=podaac/
# -Dsonar.tests=tests/
# -Dsonar.projectName=l2ss-py
# -Dsonar.projectVersion=${{ env.software_version }}
# -Dsonar.python.version=3.8,3.9,3.10

# - name: Java Debugging
# run: |
# java --version
# which java
# ls -al /usr/bin/java


# # This step will fail the build if snyk fails
# - name: Run Snyk as a blocking step
# uses: snyk/actions/gradle@master
# env:
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
# JAVA_HOME: /usr/lib/jvm/default-java/
# with:
# command: test
# args: >
# --org=${{ secrets.SNYK_ORG_ID }}
# --project-name=${{ github.repository }}
# --severity-threshold=high
# --fail-on=all

# # This step will send the results of snyk to the snyk servers
# - name: Run Snyk on Python
# uses: snyk/actions/python-3.8@master
# env:
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
# with:
# command: monitor
# args: >
# --org=${{ secrets.SNYK_ORG_ID }}
# --project-name=${{ github.repository }}

# Lastly run the tests bundled with the repo
# - name: Test and coverage
# run: |
# gradle wrapper --gradle-version 6.3
# ./gradlew test
# ./gradlew mergeJUnitReports
# junit 'build/test-results/test/TESTS-TestSuites.xml'

- name: Test and coverage
run: |
gradle wrapper --gradle-version 6.3
./gradlew test
./gradlew mergeJUnitReports
#########################################################################
# Publish release to releases
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-created.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
${{ startsWith(github.ref, 'refs/heads/release/') }}
steps:
# Checks-out the develop branch
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: 'refs/heads/develop'

- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
Expand Down
12 changes: 10 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ configurations {
}
}

configurations.all {
resolutionStrategy {
force 'junit:junit:4.13.2' // Force the fixed version
}
}

dependencies {
compile group: 'com.vividsolutions', name: 'jts', version: '1.13'
compile group: 'gov.nasa.earthdata', name: 'cumulus-message-adapter', version: '2.0.0'
Expand All @@ -55,11 +61,13 @@ dependencies {
compile group: 'com.google.code.gson', name: 'gson', version: '2.9.0'

compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
testCompile group: 'junit', name: 'junit', version: '4.13.2'

compile group: 'org.json', name: 'json', version: '20231013'

compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
compile group: 'commons-io', name: 'commons-io', version: '2.8.0'
compile group: 'edu.ucar', name: 'cdm', version: '4.6.20'
compile group: 'commons-io', name: 'commons-io', version: '2.18.0'
compile group: 'edu.ucar', name: 'cdm-core', version: '5.7.0'

compile group: 'org.geotools', name: 'gt-shapefile', version: '29.2'
compile group: 'commons-cli', name: 'commons-cli', version: '1.4'
Expand Down

0 comments on commit 6c2faf6

Please sign in to comment.