From ba31b4755b57fc4ef4cbacc5a759fad27b40ea94 Mon Sep 17 00:00:00 2001 From: Stephan Schnabel Date: Fri, 2 Sep 2022 09:13:08 +0200 Subject: [PATCH 1/2] Maintain actions --- .github/dependabot.yml | 4 +- .github/workflows/ci.yaml | 61 ++++++++++++++++++++++++++++++ .github/workflows/codeql.yaml | 22 ----------- .github/workflows/dependabot.yaml | 6 +-- .github/workflows/lint.yaml | 26 ------------- .github/workflows/pullrequest.yaml | 26 ------------- .github/workflows/release.yaml | 8 ++-- .github/workflows/snapshot.yaml | 35 ----------------- .markdownlint.yaml | 9 +++-- .yamllint | 9 +++++ 10 files changed, 85 insertions(+), 121 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/codeql.yaml delete mode 100644 .github/workflows/lint.yaml delete mode 100644 .github/workflows/pullrequest.yaml delete mode 100644 .github/workflows/snapshot.yaml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f12985f..ce15cea 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,10 +3,10 @@ updates: - package-ecosystem: maven directory: / schedule: - interval: monthly + interval: daily ignore: - dependency-name: ch.qos.logback:logback-classic - update-types: ["version-update:semver-major", "version-update:semver-minor"] + update-types: [version-update:semver-major, version-update:semver-minor] - package-ecosystem: github-actions directory: / schedule: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..b40100f --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,61 @@ +name: CI + +on: + push: + branches: [main] + pull_request: {} + schedule: [cron: 0 0 * * 1-5] + +jobs: + + yaml: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ibiqlik/action-yamllint@v3 + with: + format: colored + strict: true + + markdown: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: avto-dev/markdown-lint@v1 + with: + args: /github/workspace + + codeql: + runs-on: ubuntu-latest + permissions: + security-events: write + actions: read + contents: read + steps: + - uses: actions/checkout@v3 + - uses: github/codeql-action/init@v2 + with: + languages: java + - uses: github/codeql-action/autobuild@v2 + - uses: github/codeql-action/analyze@v2 + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + cache: maven + server-id: sonatype-nexus + server-username: SERVER_USERNAME + server-password: SERVER_PASSWORD + - run: mvn -B -ntp dependency:go-offline + - run: mvn -B -ntp verify + if: ${{ github.ref != 'refs/heads/main' }} + - run: mvn -B -ntp deploy + if: ${{ github.ref == 'refs/heads/main' }} + env: + SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} + SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml deleted file mode 100644 index d0913c3..0000000 --- a/.github/workflows/codeql.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: CodeQL - -"on": - workflow_dispatch: {} - pull_request: {} - schedule: - - cron: '0 0 * * *' - -jobs: - codeql: - runs-on: ubuntu-latest - permissions: - security-events: write - actions: read - contents: read - steps: - - uses: actions/checkout@v3 - - uses: github/codeql-action/init@v2 - with: - languages: java - - uses: github/codeql-action/autobuild@v2 - - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/dependabot.yaml b/.github/workflows/dependabot.yaml index bcbe4a7..ed63eca 100644 --- a/.github/workflows/dependabot.yaml +++ b/.github/workflows/dependabot.yaml @@ -1,6 +1,6 @@ name: Dependabot -"on": pull_request_target +on: pull_request_target jobs: auto-merge: @@ -9,9 +9,9 @@ jobs: steps: - run: gh pr review --approve "$PR_URL" env: - PR_URL: ${{github.event.pull_request.html_url}} + PR_URL: ${{ github.event.pull_request.html_url }} GITHUB_TOKEN: ${{ secrets.GIT_ACTION_TOKEN }} - run: gh pr merge --auto --squash "$PR_URL" env: - PR_URL: ${{github.event.pull_request.html_url}} + PR_URL: ${{ github.event.pull_request.html_url }} GITHUB_TOKEN: ${{ secrets.GIT_ACTION_TOKEN }} diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml deleted file mode 100644 index fa10df9..0000000 --- a/.github/workflows/lint.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Lint - -"on": - workflow_dispatch: {} - push: - branches: [main] - pull_request: {} - -jobs: - - yaml: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: ibiqlik/action-yamllint@v3 - with: - format: colored - strict: true - - markdown: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: avto-dev/markdown-lint@v1 - with: - args: /github/workspace diff --git a/.github/workflows/pullrequest.yaml b/.github/workflows/pullrequest.yaml deleted file mode 100644 index f5e7588..0000000 --- a/.github/workflows/pullrequest.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: PullRequest - -"on": pull_request - -jobs: - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 11 - cache: maven - - run: mvn -B dependency:go-offline - - run: mvn -B verify - - uses: dorny/test-reporter@v1.5.0 - if: failure() - with: - name: surefire - path: '**/target/surefire-reports/*.xml,**/target/invoker-reports/*.xml' - reporter: java-junit - list-suites: failed - list-tests: failed - fail-on-error: false diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1ac888f..4f561a0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,6 +1,6 @@ name: Release -"on": workflow_dispatch +on: workflow_dispatch jobs: build: @@ -25,9 +25,9 @@ jobs: server-password: SERVER_PASSWORD gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} gpg-passphrase: GPG_PASSPHRASE - - run: mvn -B dependency:go-offline - - run: mvn -B release:prepare - - run: mvn -B release:perform + - run: mvn -B -ntp dependency:go-offline + - run: mvn -B -ntp release:prepare + - run: mvn -B -ntp release:perform env: SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} diff --git a/.github/workflows/snapshot.yaml b/.github/workflows/snapshot.yaml deleted file mode 100644 index 2bee99b..0000000 --- a/.github/workflows/snapshot.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: Snapshot - -"on": - workflow_dispatch: {} - push: - branches: [main] - paths-ignore: ['**.md'] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 11 - cache: maven - server-id: sonatype-nexus - server-username: SERVER_USERNAME - server-password: SERVER_PASSWORD - - run: mvn -B dependency:go-offline - - run: mvn -B deploy - env: - SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} - SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} - - uses: dorny/test-reporter@v1.5.0 - if: failure() - with: - name: surefire - path: '**/target/surefire-reports/*.xml' - reporter: java-junit - list-suites: failed - list-tests: failed - fail-on-error: false diff --git a/.markdownlint.yaml b/.markdownlint.yaml index dd23793..5f08047 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -1,6 +1,9 @@ # Default state for all rules default: true -# MD013/line-length - Line length -MD013: - line_length: 10000 +# MD009 - Trailing spaces +MD009: + strict: true + +# MD013 - Line length +MD013: false diff --git a/.yamllint b/.yamllint index 9d1b12e..8011808 100644 --- a/.yamllint +++ b/.yamllint @@ -8,3 +8,12 @@ rules: # line length is not important line-length: disable + + # force double quotes everywhere + quoted-strings: + quote-type: double + required: only-when-needed + + # allow everything on keys + truthy: + check-keys: false -- 2.47.2 From 45dc3e361d2775350407ce766652ae5fd832b0ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Sep 2022 08:22:23 +0000 Subject: [PATCH 2/2] Bump micronaut-bom from 3.5.4 to 3.6.1 (#70) * Bump micronaut-bom from 3.5.4 to 3.6.1 Bumps [micronaut-bom](https://github.com/micronaut-projects/micronaut-core) from 3.5.4 to 3.6.1. - [Release notes](https://github.com/micronaut-projects/micronaut-core/releases) - [Changelog](https://github.com/micronaut-projects/micronaut-core/blob/3.6.x/RELEASE.adoc) - [Commits](https://github.com/micronaut-projects/micronaut-core/compare/v3.5.4...v3.6.1) --- updated-dependencies: - dependency-name: io.micronaut:micronaut-bom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Fix micronaut issue with new version Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stephan Schnabel --- pom.xml | 2 +- .../logging/http/AbstractFilterTest.java | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index 009e919..511d9c6 100644 --- a/pom.xml +++ b/pom.xml @@ -107,7 +107,7 @@ 1.2.11 0.1.5 - 3.5.4 + 3.6.1 diff --git a/src/test/java/io/kokuwa/micronaut/logging/http/AbstractFilterTest.java b/src/test/java/io/kokuwa/micronaut/logging/http/AbstractFilterTest.java index 56b68d0..ab31e47 100644 --- a/src/test/java/io/kokuwa/micronaut/logging/http/AbstractFilterTest.java +++ b/src/test/java/io/kokuwa/micronaut/logging/http/AbstractFilterTest.java @@ -7,7 +7,6 @@ import static org.junit.jupiter.api.Assertions.fail; import java.util.Map; import java.util.function.Consumer; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.slf4j.Logger; @@ -46,24 +45,14 @@ import jakarta.inject.Inject; @MicronautTest(rebuildContext = true) public abstract class AbstractFilterTest extends AbstractTest { - private static boolean INIT = false; - @Inject SignatureGeneratorConfiguration signature; @Inject EmbeddedServer embeddedServer; - @DisplayName("0 init") + @DisplayName("0 - trigger rebuild of context") @Test - @BeforeEach - void refresh() { - // https://github.com/micronaut-projects/micronaut-core/issues/5453#issuecomment-864594741 - if (INIT) { - embeddedServer.refresh(); - } else { - INIT = true; - } - } + void rebuild() {} // security -- 2.47.2