From b0ba1f6df4533872688df3fb399f309f3200b3f0 Mon Sep 17 00:00:00 2001 From: ndr_brt Date: Wed, 21 Aug 2024 18:05:50 +0200 Subject: [PATCH] ci: launch test workflow also on release and bugfix branches (#427) * ci: launch test workflow also on release and bugfix branches * DEPENDENCIES --- .github/workflows/codeql-analysis.yml | 49 -------------------------- .github/workflows/dependency-check.yml | 15 -------- .github/workflows/pull-request.yaml | 34 ------------------ .github/workflows/verify-openapi.yml | 9 ----- .github/workflows/verify.yaml | 20 +++++++---- DEPENDENCIES | 46 +++++++++++------------- build.gradle.kts | 22 ++---------- gradle.properties | 4 --- 8 files changed, 36 insertions(+), 163 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml delete mode 100644 .github/workflows/dependency-check.yml delete mode 100644 .github/workflows/pull-request.yaml delete mode 100644 .github/workflows/verify-openapi.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index b043e21b9..000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: "CodeQL" - -on: - push: - branches: - - main - paths-ignore: - - '**.md' - - 'docs/**' - pull_request: - paths-ignore: - - '**.md' - - 'docs/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - language: [ 'java' ] - - steps: - - uses: actions/checkout@v4 - - uses: eclipse-edc/.github/.github/actions/setup-build@main - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - queries: +security-and-quality - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Compiles production Java source (without tests) - - name: Build - run: ./gradlew compileJava --no-daemon - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/dependency-check.yml b/.github/workflows/dependency-check.yml deleted file mode 100644 index ea3167a23..000000000 --- a/.github/workflows/dependency-check.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: 'Dependency Review' - -on: - push: - branches: - - main - pull_request: - -permissions: - contents: read - -jobs: - check: - uses: eclipse-edc/.github/.github/workflows/dependency-check.yml@main - secrets: inherit diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml deleted file mode 100644 index 4ce710e35..000000000 --- a/.github/workflows/pull-request.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: Scan Pull Request - -on: - pull_request: - branches: [ main ] - types: [opened, edited, synchronize, reopened, labeled, unlabeled] - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - check-pull-request-title: - runs-on: ubuntu-latest - continue-on-error: false - steps: - - uses: actions/checkout@v4 - - uses: deepakputhraya/action-pr-title@master - with: - # Match pull request titles conventional commit syntax (https://www.conventionalcommits.org/en/v1.0.0/) - # (online tool for regex quick check: https://regex101.com/r/V5J8kh/1) - # - # Valid examples would be - # - fix: resolve minor issue - # - docs(Sample5): update docs for configuration - # - feat(management-api)!: change path to access contract agreements - # - # Invalid examples would be - # - Add cool feature - # - Feature/some cool improvement - # - fix: resolve minor issue. - regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(\w+((,|\/|\\)?\s?\w+)+\))?!?: [\S ]{1,80}[^\.]$' - allowed_prefixes: 'build,chore,ci,docs,feat,fix,perf,refactor,revert,style,test' - prefix_case_sensitive: true diff --git a/.github/workflows/verify-openapi.yml b/.github/workflows/verify-openapi.yml deleted file mode 100644 index e0c77f84f..000000000 --- a/.github/workflows/verify-openapi.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: verify openapi - -on: - pull_request: - -jobs: - verify: - uses: eclipse-edc/.github/.github/workflows/verify-openapi.yml@main - secrets: inherit diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index c42a7f201..59125f618 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -7,6 +7,7 @@ on: - '**.md' - 'docs/**' pull_request: + branches: [ main, release/*, bugfix/* ] paths-ignore: - '**.md' - 'docs/**' @@ -21,6 +22,14 @@ jobs: - name: Run Checkstyle run: ./gradlew checkstyleMain checkstyleTest checkstyleTestFixtures + CodeQL: + uses: eclipse-edc/.github/.github/workflows/codeql-analysis.yml@main + secrets: inherit + + Dependency-Check: + uses: eclipse-edc/.github/.github/workflows/dependency-check.yml@main + secrets: inherit + Javadoc: runs-on: ubuntu-latest steps: @@ -76,12 +85,6 @@ jobs: INTEGRATION_TEST: true JACOCO: "true" - # - name: 'Publish Test Results' - # uses: EnricoMi/publish-unit-test-result-action@v1 - # if: always() - # with: - # files: "**/test-results/**/*.xml" - Integration-Tests: runs-on: ubuntu-latest env: @@ -125,3 +128,8 @@ jobs: path: artifacts - name: CodeCov uses: codecov/codecov-action@v4 + + Verify-OpenApi: + if: github.event_name == 'pull_request' + uses: eclipse-edc/.github/.github/workflows/verify-openapi.yml@main + secrets: inherit diff --git a/DEPENDENCIES b/DEPENDENCIES index f1e5cd28a..d375d806d 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -299,26 +299,26 @@ maven/mavencentral/org.eclipse.edc/verifiable-credentials/0.8.2-SNAPSHOT, Apache maven/mavencentral/org.eclipse.edc/web-spi/0.8.2-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.jetty.toolchain/jetty-jakarta-servlet-api/5.0.2, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.eclipse.jetty.toolchain/jetty-jakarta-websocket-api/2.0.0, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-client/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-common/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-server/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-client/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-common/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-server/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-servlet/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-alpn-client/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-annotations/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-client/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-http/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-io/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-jndi/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-plus/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-security/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-server/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-servlet/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-util/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-webapp/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-xml/11.0.22, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-client/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-common/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-server/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-client/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-common/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-server/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-servlet/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-alpn-client/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-annotations/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-client/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-http/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-io/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-jndi/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-plus/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-security/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-server/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-servlet/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-util/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-webapp/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-xml/11.0.23, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.eclipse.parsson/parsson/1.1.7, EPL-2.0, approved, ee4j.parsson maven/mavencentral/org.glassfish.hk2.external/aopalliance-repackaged/3.0.6, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish maven/mavencentral/org.glassfish.hk2/hk2-api/3.0.6, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish @@ -353,18 +353,12 @@ maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib/1.9.10, Apache-2.0, approv maven/mavencentral/org.jetbrains/annotations/13.0, Apache-2.0, approved, clearlydefined maven/mavencentral/org.jetbrains/annotations/17.0.0, Apache-2.0, approved, clearlydefined maven/mavencentral/org.jetbrains/annotations/24.1.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/org.junit-pioneer/junit-pioneer/2.2.0, EPL-2.0, approved, #11857 -maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.10.3, EPL-2.0, approved, #9714 maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.11.0, EPL-2.0, approved, #15935 maven/mavencentral/org.junit.jupiter/junit-jupiter-engine/5.11.0, EPL-2.0, approved, #15939 maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.11.0, EPL-2.0, approved, #15940 -maven/mavencentral/org.junit.platform/junit-platform-commons/1.10.3, EPL-2.0, approved, #9715 maven/mavencentral/org.junit.platform/junit-platform-commons/1.11.0, EPL-2.0, approved, #15936 maven/mavencentral/org.junit.platform/junit-platform-engine/1.11.0, EPL-2.0, approved, #15932 -maven/mavencentral/org.junit.platform/junit-platform-launcher/1.11.0, EPL-2.0, approved, #15934 -maven/mavencentral/org.junit/junit-bom/5.10.3, EPL-2.0, approved, #9844 maven/mavencentral/org.junit/junit-bom/5.11.0, , restricted, clearlydefined -maven/mavencentral/org.junit/junit-bom/5.9.2, EPL-2.0, approved, #4711 maven/mavencentral/org.jvnet.mimepull/mimepull/1.9.15, CDDL-1.1 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, CQ21484 maven/mavencentral/org.mock-server/mockserver-client-java/5.15.0, Apache-2.0 AND LGPL-3.0-only, approved, #9324 maven/mavencentral/org.mock-server/mockserver-core/5.15.0, Apache-2.0, approved, clearlydefined diff --git a/build.gradle.kts b/build.gradle.kts index d8588298f..d898f7623 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,40 +18,22 @@ plugins { val edcScmConnection: String by project val edcScmUrl: String by project -val annotationProcessorVersion: String by project -val metaModelVersion: String by project buildscript { dependencies { - val edcGradlePluginsVersion: String by project - classpath("org.eclipse.edc.edc-build:org.eclipse.edc.edc-build.gradle.plugin:${edcGradlePluginsVersion}") + val version: String by project + classpath("org.eclipse.edc.edc-build:org.eclipse.edc.edc-build.gradle.plugin:$version") } } allprojects { apply(plugin = "${group}.edc-build") - // configure which version of the annotation processor to use. defaults to the same version as the plugin - configure { - processorVersion.set(annotationProcessorVersion) - outputDirectory.set(project.layout.buildDirectory.asFile) - } - configure { - versions { - // override default dependency versions here - metaModel.set(metaModelVersion) - } pom { scmConnection.set(edcScmConnection) scmUrl.set(edcScmUrl) } - swagger { - title.set("Identity Hub REST API") - description = "Identity Hub REST APIs - merged by OpenApiMerger" - outputFilename.set(project.name) - outputDirectory.set(file("${rootProject.projectDir.path}/resources/openapi/yaml")) - } } configure { diff --git a/gradle.properties b/gradle.properties index 5cb633f20..1e9f59e55 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,10 +1,6 @@ group=org.eclipse.edc version=0.8.2-SNAPSHOT -edcGradlePluginsVersion=0.8.2-SNAPSHOT -annotationProcessorVersion=0.8.2-SNAPSHOT -metaModelVersion=0.8.2-SNAPSHOT - # information required for publishing artifacts: edcScmConnection=scm:git:git@github.com:eclipse-edc/IdentityHub.git edcScmUrl=https://github.com/eclipse-edc/IdentityHub.git