From 8c0b4af2010cb57ad9eb7e312c53d64e82e6f5f0 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Sat, 12 Oct 2024 13:58:26 +0800 Subject: [PATCH 01/30] dbeaver/dbeaver-devops#1525 add github checks --- .github/actions/pull-repositories/action.yml | 57 ++++++++++++++++++++ .github/workflows/build.yml | 37 +++++++++++++ .github/workflows/common-cleanup.yml | 33 ++++++++++++ .github/workflows/lint.yml | 36 +++++++++++++ .github/workflows/push-pr-devel.yml | 25 +++++++++ .gitignore | 1 + 6 files changed, 189 insertions(+) create mode 100644 .github/actions/pull-repositories/action.yml create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/common-cleanup.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/push-pr-devel.yml diff --git a/.github/actions/pull-repositories/action.yml b/.github/actions/pull-repositories/action.yml new file mode 100644 index 0000000..9ca1991 --- /dev/null +++ b/.github/actions/pull-repositories/action.yml @@ -0,0 +1,57 @@ +name: "Clone Repositories" +description: "Clones repositories listed in a provided project.deps file" + +inputs: + token: + description: > + Personal access token (PAT) used to fetch the repository. The PAT is configured + with the local git config, which enables your scripts to run authenticated git + commands. The post-job step removes the PAT. + + + We recommend using a service account with the least permissions necessary. + Also when generating a new PAT, select the least scopes necessary. + + + [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) + default: ${{ github.token }} + project_deps_path: + description: "The content of the project.deps file with repository names" + required: true + github_head_ref: + description: "The head reference of the pull request" + required: true + github_base_ref: + description: "The base reference of the pull request" + required: true + +runs: + using: "composite" + steps: + - name: Clone repositories from project.deps + shell: bash + run: | + exit_code=0 + while IFS= read -r repo; do + echo "Cloning repository: $repo" + { + default_branch=$(git ls-remote --symref "https://${{ inputs.token }}@github.com/dbeaver/$repo.git" HEAD | grep '^ref:' | awk '{print $2}' | sed 's|refs/heads/||') + + # Try to clone the head branch, then the base branch, and finally the default branch + git clone --depth 1 -b "${{ inputs.github_head_ref }}" "https://${{ inputs.token }}@github.com/dbeaver/$repo.git" 2>/dev/null || \ + git clone --depth 1 -b "${{ inputs.github_base_ref }}" "https://${{ inputs.token }}@github.com/dbeaver/$repo.git" 2>/dev/null || \ + git clone --depth 1 -b "$default_branch" "https://${{ inputs.token }}@github.com/dbeaver/$repo.git" + + # Capture the exit code of the last command + if [[ $? -ne 0 ]]; then + exit_code=1 # Set exit_code to 1 if any clone command fails + fi + } & + done < "${{ inputs.project_deps_path }}" + + wait + + # Exit with the appropriate exit code + exit $exit_code + + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..89196c6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build + +on: + workflow_call: + outputs: + run-id: + value: ${{ jobs.build-and-test.outputs.run-id }} + +jobs: + build-and-test: + name: Build + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + + outputs: + run-id: ${{ github.run_id }} + + steps: + - name: Checkout dbeaver-vscode + uses: actions/checkout@v4 + + - uses: stCarolas/setup-maven@v5 + with: + maven-version: 3.9.6 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "17" + cache: maven + + - name: Build + run: mvn -B -T 1C clean package + diff --git a/.github/workflows/common-cleanup.yml b/.github/workflows/common-cleanup.yml new file mode 100644 index 0000000..0a1dd1c --- /dev/null +++ b/.github/workflows/common-cleanup.yml @@ -0,0 +1,33 @@ +name: Cleanup checks + +on: + pull_request: + types: [closed] + push: + branches: + - devel + +jobs: + delete-caches: + timeout-minutes: 5 + runs-on: ubuntu-latest + steps: + - name: Cleanup + run: | + gh extension install actions/gh-actions-cache + + echo "Fetching list of cache keys" + cacheKeys=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 ) + + # Setting this to not fail the workflow while deleting cache keys. + set +e + echo "Deleting caches..." + for cacheKey in $cacheKeys + do + gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm + done + echo "Done" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + BRANCH: ${{ github.event_name == 'pull_request' && format('refs/pull/{0}/merge', github.event.pull_request.number) || 'refs/heads/main' }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..8ce830c --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,36 @@ +name: Lint + +on: + # Allows you to reuse workflows by referencing their YAML files + workflow_call: + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + + - name: Checkout checkstyle config repository + uses: actions/checkout@v4 + with: + repository: dbeaver/dbeaver + path: dbeaver-config + + - name: Copy checkstyle config + run: cp dbeaver-config/dbeaver-checkstyle-config.xml ./dbeaver-checkstyle-config.xml + + - name: Remove checkstyle config directory + run: rm -rf dbeaver-config + + - uses: dbelyaev/action-checkstyle@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-annotations + filter_mode: diff_context + checkstyle_config: ./dbeaver-checkstyle-config.xml + fail_on_error: true diff --git a/.github/workflows/push-pr-devel.yml b/.github/workflows/push-pr-devel.yml new file mode 100644 index 0000000..4d7f47c --- /dev/null +++ b/.github/workflows/push-pr-devel.yml @@ -0,0 +1,25 @@ +name: CI + +on: + pull_request: + branches: [devel] + push: + branches: [devel] + +concurrency: + group: | + # For pull requests, group by the pull request ID + ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) }} + + # For pushes to main, group by the branch name (e.g., 'main') + ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'main-branch' }} + cancel-in-progress: true + +jobs: + build-server: + uses: ./.github/workflows/build.yml + secrets: inherit + + lint-server: + uses: ./.github/workflows/lint.yml + secrets: inherit diff --git a/.gitignore b/.gitignore index f3b8d30..1c2bef0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # java +target/ .project .classpath .settings/ \ No newline at end of file From ee86b4c83b0bb6442cf584d65033db1653601afd Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Sat, 12 Oct 2024 14:00:32 +0800 Subject: [PATCH 02/30] chore: rename jobs --- .github/workflows/push-pr-devel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push-pr-devel.yml b/.github/workflows/push-pr-devel.yml index 4d7f47c..82fa866 100644 --- a/.github/workflows/push-pr-devel.yml +++ b/.github/workflows/push-pr-devel.yml @@ -16,10 +16,10 @@ concurrency: cancel-in-progress: true jobs: - build-server: + build: uses: ./.github/workflows/build.yml secrets: inherit - lint-server: + lint: uses: ./.github/workflows/lint.yml secrets: inherit From d9564e9cdfb99a7e06ea46d26913f5dc526d2f53 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Sat, 12 Oct 2024 14:31:00 +0800 Subject: [PATCH 03/30] dbeaver/dbeaver-devops#1525 remove pull-repositories action --- .github/actions/pull-repositories/action.yml | 57 -------------------- .github/workflows/build.yml | 3 +- 2 files changed, 1 insertion(+), 59 deletions(-) delete mode 100644 .github/actions/pull-repositories/action.yml diff --git a/.github/actions/pull-repositories/action.yml b/.github/actions/pull-repositories/action.yml deleted file mode 100644 index 9ca1991..0000000 --- a/.github/actions/pull-repositories/action.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: "Clone Repositories" -description: "Clones repositories listed in a provided project.deps file" - -inputs: - token: - description: > - Personal access token (PAT) used to fetch the repository. The PAT is configured - with the local git config, which enables your scripts to run authenticated git - commands. The post-job step removes the PAT. - - - We recommend using a service account with the least permissions necessary. - Also when generating a new PAT, select the least scopes necessary. - - - [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) - default: ${{ github.token }} - project_deps_path: - description: "The content of the project.deps file with repository names" - required: true - github_head_ref: - description: "The head reference of the pull request" - required: true - github_base_ref: - description: "The base reference of the pull request" - required: true - -runs: - using: "composite" - steps: - - name: Clone repositories from project.deps - shell: bash - run: | - exit_code=0 - while IFS= read -r repo; do - echo "Cloning repository: $repo" - { - default_branch=$(git ls-remote --symref "https://${{ inputs.token }}@github.com/dbeaver/$repo.git" HEAD | grep '^ref:' | awk '{print $2}' | sed 's|refs/heads/||') - - # Try to clone the head branch, then the base branch, and finally the default branch - git clone --depth 1 -b "${{ inputs.github_head_ref }}" "https://${{ inputs.token }}@github.com/dbeaver/$repo.git" 2>/dev/null || \ - git clone --depth 1 -b "${{ inputs.github_base_ref }}" "https://${{ inputs.token }}@github.com/dbeaver/$repo.git" 2>/dev/null || \ - git clone --depth 1 -b "$default_branch" "https://${{ inputs.token }}@github.com/dbeaver/$repo.git" - - # Capture the exit code of the last command - if [[ $? -ne 0 ]]; then - exit_code=1 # Set exit_code to 1 if any clone command fails - fi - } & - done < "${{ inputs.project_deps_path }}" - - wait - - # Exit with the appropriate exit code - exit $exit_code - - diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 89196c6..9d6f325 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,8 +18,7 @@ jobs: run-id: ${{ github.run_id }} steps: - - name: Checkout dbeaver-vscode - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - uses: stCarolas/setup-maven@v5 with: From 3c843fee331b8f44e761371fb879a478cb223950 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Mon, 14 Oct 2024 17:43:32 +0800 Subject: [PATCH 04/30] dbeaver/dbeaver-devops#1525 rename steps --- .github/workflows/push-pr-devel.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/push-pr-devel.yml b/.github/workflows/push-pr-devel.yml index 82fa866..32926ca 100644 --- a/.github/workflows/push-pr-devel.yml +++ b/.github/workflows/push-pr-devel.yml @@ -18,8 +18,10 @@ concurrency: jobs: build: uses: ./.github/workflows/build.yml + name: Check secrets: inherit lint: uses: ./.github/workflows/lint.yml + name: Check secrets: inherit From 4c37185187ece970209725c0457b0372984a017f Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Mon, 14 Oct 2024 21:43:15 +0800 Subject: [PATCH 05/30] dbeaver/dbeaver-devops#1525 reuse workflows --- .github/workflows/build.yml | 36 --------- ...{common-cleanup.yml => cleanup-caches.yml} | 10 +-- .../{lint.yml => java-checkstyle.yml} | 8 ++ .github/workflows/mvn-package.yml | 77 +++++++++++++++++++ .github/workflows/pr-close-push-devel.yml | 14 ++++ .github/workflows/push-pr-devel.yml | 20 ++--- 6 files changed, 110 insertions(+), 55 deletions(-) delete mode 100644 .github/workflows/build.yml rename .github/workflows/{common-cleanup.yml => cleanup-caches.yml} (87%) rename .github/workflows/{lint.yml => java-checkstyle.yml} (69%) create mode 100644 .github/workflows/mvn-package.yml create mode 100644 .github/workflows/pr-close-push-devel.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 9d6f325..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Build - -on: - workflow_call: - outputs: - run-id: - value: ${{ jobs.build-and-test.outputs.run-id }} - -jobs: - build-and-test: - name: Build - runs-on: ubuntu-latest - timeout-minutes: 10 - permissions: - contents: read - - outputs: - run-id: ${{ github.run_id }} - - steps: - - uses: actions/checkout@v4 - - - uses: stCarolas/setup-maven@v5 - with: - maven-version: 3.9.6 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: "temurin" - java-version: "17" - cache: maven - - - name: Build - run: mvn -B -T 1C clean package - diff --git a/.github/workflows/common-cleanup.yml b/.github/workflows/cleanup-caches.yml similarity index 87% rename from .github/workflows/common-cleanup.yml rename to .github/workflows/cleanup-caches.yml index 0a1dd1c..000ae3f 100644 --- a/.github/workflows/common-cleanup.yml +++ b/.github/workflows/cleanup-caches.yml @@ -1,18 +1,14 @@ -name: Cleanup checks +name: Cleanup caches on: - pull_request: - types: [closed] - push: - branches: - - devel + workflow_call: jobs: delete-caches: timeout-minutes: 5 runs-on: ubuntu-latest steps: - - name: Cleanup + - name: Cleanup caches run: | gh extension install actions/gh-actions-cache diff --git a/.github/workflows/lint.yml b/.github/workflows/java-checkstyle.yml similarity index 69% rename from .github/workflows/lint.yml rename to .github/workflows/java-checkstyle.yml index 8ce830c..fccecf3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/java-checkstyle.yml @@ -4,6 +4,14 @@ on: # Allows you to reuse workflows by referencing their YAML files workflow_call: +concurrency: + group: | + # For pull requests, group by the pull request ID + ${{ github.event_name == 'pull_request' && format('pr-{0}-java-checkstyle', github.event.pull_request.number) }} + + # For pushes to main, group by the branch name (e.g., 'main') + ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'main-branch-java-checkstyle' }} + cancel-in-progress: true jobs: lint: name: Lint diff --git a/.github/workflows/mvn-package.yml b/.github/workflows/mvn-package.yml new file mode 100644 index 0000000..ae66b20 --- /dev/null +++ b/.github/workflows/mvn-package.yml @@ -0,0 +1,77 @@ +name: MVN Package + +on: + workflow_call: + inputs: + project-directory: + required: false + type: string + default: '.' + timeout-minutes: + required: false + type: number + default: 10 + project-deps: + required: false + type: string + + outputs: + run-id: + value: ${{ jobs.build-and-test.outputs.run-id }} + + secrets: + DEVOPS_ISSUE_RO_TOKEN: + required: false + +concurrency: + group: | + # For pull requests, group by the pull request ID + ${{ github.event_name == 'pull_request' && format('pr-{0}-mvn-package', github.event.pull_request.number) }} + + # For pushes to main, group by the branch name (e.g., 'main') + ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'main-branch-mvn-package' }} + cancel-in-progress: true + +jobs: + build-and-test: + name: Build + runs-on: ubuntu-latest + timeout-minutes: ${{ inputs.timeout-minutes }} + permissions: + contents: read + + outputs: + run-id: ${{ github.run_id }} + + steps: + - name: Set repository path variable + if: ${{ inputs.project-deps != null }} + run: echo "CHECKOUT_PATH=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - name: Checkout repository + uses: actions/checkout@v4 + with: + path: ${{ env.CHECKOUT_PATH || '.' }} + + - name: Clone Deps Repositories + if: ${{ inputs.project-deps != null }} + uses: dbeaver/github-actions/clone-repositories@devel + with: + project_deps_path: ${{ inputs.project-deps }} + token: ${{ secrets.DEVOPS_ISSUE_RO_TOKEN }} + + - uses: stCarolas/setup-maven@v5 + with: + maven-version: 3.9.6 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "17" + cache: maven + + - name: Build + run: mvn -B -T 1C clean package + working-directory: ${{ inputs.project-directory }} + diff --git a/.github/workflows/pr-close-push-devel.yml b/.github/workflows/pr-close-push-devel.yml new file mode 100644 index 0000000..cd1a13f --- /dev/null +++ b/.github/workflows/pr-close-push-devel.yml @@ -0,0 +1,14 @@ +name: Cleanup + +on: + pull_request: + types: [closed] + push: + branches: + - devel + +jobs: + delete-caches: + name: Cleanup + uses: ./.github/workflows/cleanup-caches.yml + secrets: inherit diff --git a/.github/workflows/push-pr-devel.yml b/.github/workflows/push-pr-devel.yml index 32926ca..87d2832 100644 --- a/.github/workflows/push-pr-devel.yml +++ b/.github/workflows/push-pr-devel.yml @@ -2,26 +2,22 @@ name: CI on: pull_request: - branches: [devel] + types: + - opened + - synchronize + - reopened push: branches: [devel] -concurrency: - group: | - # For pull requests, group by the pull request ID - ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) }} - - # For pushes to main, group by the branch name (e.g., 'main') - ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'main-branch' }} - cancel-in-progress: true - jobs: build: - uses: ./.github/workflows/build.yml + uses: ./.github/workflows/mvn-package.yml name: Check secrets: inherit + with: + timeout-minutes: 10 lint: - uses: ./.github/workflows/lint.yml + uses: ./.github/workflows/java-checkstyle.yml name: Check secrets: inherit From a364691003e18ccfe02f5e83afdb3f4cad4431f1 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Mon, 14 Oct 2024 21:57:38 +0800 Subject: [PATCH 06/30] dbeaver/dbeaver-devops#1525 always pull to subfolder --- .github/workflows/mvn-package.yml | 4 +--- .github/workflows/push-pr-devel.yml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mvn-package.yml b/.github/workflows/mvn-package.yml index ae66b20..93519e0 100644 --- a/.github/workflows/mvn-package.yml +++ b/.github/workflows/mvn-package.yml @@ -6,7 +6,6 @@ on: project-directory: required: false type: string - default: '.' timeout-minutes: required: false type: number @@ -45,7 +44,6 @@ jobs: steps: - name: Set repository path variable - if: ${{ inputs.project-deps != null }} run: echo "CHECKOUT_PATH=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - name: Checkout repository @@ -73,5 +71,5 @@ jobs: - name: Build run: mvn -B -T 1C clean package - working-directory: ${{ inputs.project-directory }} + working-directory: ${{ inputs.project-directory || env.CHECKOUT_PATH || '.' }} diff --git a/.github/workflows/push-pr-devel.yml b/.github/workflows/push-pr-devel.yml index 87d2832..0d69344 100644 --- a/.github/workflows/push-pr-devel.yml +++ b/.github/workflows/push-pr-devel.yml @@ -15,7 +15,7 @@ jobs: name: Check secrets: inherit with: - timeout-minutes: 10 + timeout-minutes: 5 lint: uses: ./.github/workflows/java-checkstyle.yml From 1238c10b0dc89367957a86bff92ea11d1f3f0eae Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Mon, 14 Oct 2024 22:45:48 +0800 Subject: [PATCH 07/30] dbeaver/dbeaver-devops#1525 try to use mvn from setup-java action --- .github/workflows/mvn-package.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/mvn-package.yml b/.github/workflows/mvn-package.yml index 93519e0..f2cc8c5 100644 --- a/.github/workflows/mvn-package.yml +++ b/.github/workflows/mvn-package.yml @@ -58,10 +58,6 @@ jobs: project_deps_path: ${{ inputs.project-deps }} token: ${{ secrets.DEVOPS_ISSUE_RO_TOKEN }} - - uses: stCarolas/setup-maven@v5 - with: - maven-version: 3.9.6 - - name: Set up JDK 17 uses: actions/setup-java@v4 with: From 296388323d1800d2216b4258ec0f4c4743404d1e Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Mon, 14 Oct 2024 22:49:22 +0800 Subject: [PATCH 08/30] Revert "dbeaver/dbeaver-devops#1525 try to use mvn from setup-java action" This reverts commit 1238c10b0dc89367957a86bff92ea11d1f3f0eae. --- .github/workflows/mvn-package.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/mvn-package.yml b/.github/workflows/mvn-package.yml index f2cc8c5..93519e0 100644 --- a/.github/workflows/mvn-package.yml +++ b/.github/workflows/mvn-package.yml @@ -58,6 +58,10 @@ jobs: project_deps_path: ${{ inputs.project-deps }} token: ${{ secrets.DEVOPS_ISSUE_RO_TOKEN }} + - uses: stCarolas/setup-maven@v5 + with: + maven-version: 3.9.6 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: From b0bb5cfcd83452f82c92cd820d64286f71f26de5 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Mon, 14 Oct 2024 23:16:44 +0800 Subject: [PATCH 09/30] dbeaver/dbeaver-devops#1525 try to use custom mvn install action --- .github/workflows/mvn-package.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/mvn-package.yml b/.github/workflows/mvn-package.yml index 93519e0..d1882a9 100644 --- a/.github/workflows/mvn-package.yml +++ b/.github/workflows/mvn-package.yml @@ -58,9 +58,7 @@ jobs: project_deps_path: ${{ inputs.project-deps }} token: ${{ secrets.DEVOPS_ISSUE_RO_TOKEN }} - - uses: stCarolas/setup-maven@v5 - with: - maven-version: 3.9.6 + - uses: wroud/github-actions/install-maven@ed1b33c49b62e7d7549fff323a80d900a86a0341 - name: Set up JDK 17 uses: actions/setup-java@v4 From 5de532f6e0f28bd442b344aed975dd0d1c57273d Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Mon, 14 Oct 2024 23:27:58 +0800 Subject: [PATCH 10/30] dbeaver/dbeaver-devops#1525 try to use custom mvn install action 2 --- .github/workflows/mvn-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mvn-package.yml b/.github/workflows/mvn-package.yml index d1882a9..cc48c83 100644 --- a/.github/workflows/mvn-package.yml +++ b/.github/workflows/mvn-package.yml @@ -58,7 +58,7 @@ jobs: project_deps_path: ${{ inputs.project-deps }} token: ${{ secrets.DEVOPS_ISSUE_RO_TOKEN }} - - uses: wroud/github-actions/install-maven@ed1b33c49b62e7d7549fff323a80d900a86a0341 + - uses: wroud/github-actions/install-maven@684cc4ff99df3ce06634a393e9dded82e26938bb - name: Set up JDK 17 uses: actions/setup-java@v4 From 75f5053a68d400186708d827fe08a0ead04ab9ae Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Mon, 14 Oct 2024 23:32:22 +0800 Subject: [PATCH 11/30] dbeaver/dbeaver-devops#1525 try to use custom mvn install action 3 --- .github/workflows/mvn-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mvn-package.yml b/.github/workflows/mvn-package.yml index cc48c83..ac5774f 100644 --- a/.github/workflows/mvn-package.yml +++ b/.github/workflows/mvn-package.yml @@ -58,7 +58,7 @@ jobs: project_deps_path: ${{ inputs.project-deps }} token: ${{ secrets.DEVOPS_ISSUE_RO_TOKEN }} - - uses: wroud/github-actions/install-maven@684cc4ff99df3ce06634a393e9dded82e26938bb + - uses: wroud/github-actions/install-maven@6516cc89c957b79a97cb4432cd44f3d23907d706 - name: Set up JDK 17 uses: actions/setup-java@v4 From 297479858cc44d262d250910bbe163b106fb4675 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Mon, 14 Oct 2024 23:34:57 +0800 Subject: [PATCH 12/30] dbeaver/dbeaver-devops#1525 try to different OS --- .github/workflows/mvn-package.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mvn-package.yml b/.github/workflows/mvn-package.yml index ac5774f..decafa5 100644 --- a/.github/workflows/mvn-package.yml +++ b/.github/workflows/mvn-package.yml @@ -34,7 +34,10 @@ concurrency: jobs: build-and-test: name: Build - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} timeout-minutes: ${{ inputs.timeout-minutes }} permissions: contents: read From 71dc48e51129edda2dd9f35e21ae8df8b506db65 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Mon, 14 Oct 2024 23:39:09 +0800 Subject: [PATCH 13/30] dbeaver/dbeaver-devops#1525 try to different OS 2 --- .github/workflows/mvn-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mvn-package.yml b/.github/workflows/mvn-package.yml index decafa5..165a5a2 100644 --- a/.github/workflows/mvn-package.yml +++ b/.github/workflows/mvn-package.yml @@ -61,7 +61,7 @@ jobs: project_deps_path: ${{ inputs.project-deps }} token: ${{ secrets.DEVOPS_ISSUE_RO_TOKEN }} - - uses: wroud/github-actions/install-maven@6516cc89c957b79a97cb4432cd44f3d23907d706 + - uses: wroud/github-actions/install-maven@398000c34b74e6d6ed81f2fc8dd1ba606a1bb37c - name: Set up JDK 17 uses: actions/setup-java@v4 From be5aa3cb77285dd763d45e808249384991079a13 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Mon, 14 Oct 2024 23:43:27 +0800 Subject: [PATCH 14/30] dbeaver/dbeaver-devops#1525 try to different OS 3 --- .github/workflows/mvn-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mvn-package.yml b/.github/workflows/mvn-package.yml index 165a5a2..76a8bfd 100644 --- a/.github/workflows/mvn-package.yml +++ b/.github/workflows/mvn-package.yml @@ -61,7 +61,7 @@ jobs: project_deps_path: ${{ inputs.project-deps }} token: ${{ secrets.DEVOPS_ISSUE_RO_TOKEN }} - - uses: wroud/github-actions/install-maven@398000c34b74e6d6ed81f2fc8dd1ba606a1bb37c + - uses: wroud/github-actions/install-maven@56f30609ac22a9ad021852a820ad04857208fe7b - name: Set up JDK 17 uses: actions/setup-java@v4 From 4ab21c7600369d60497d50e78455c93e904aac78 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 00:09:38 +0800 Subject: [PATCH 15/30] dbeaver/dbeaver-devops#1525 try checkstyle --- .github/workflows/java-checkstyle.yml | 23 +++++++++++++++---- .github/workflows/mvn-package.yml | 2 +- .../jdbc/model/AbstractJdbcConnection.java | 2 +- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index fccecf3..5868908 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -35,10 +35,23 @@ jobs: - name: Remove checkstyle config directory run: rm -rf dbeaver-config - - uses: dbelyaev/action-checkstyle@master + - uses: dbeaver/github-actions/install-maven@devel + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "17" + cache: maven + + - uses: Wroud/github-actions/java-checkstyle@013a4ecdb9d0a654b2636b09678d05a6ca9eede7 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - reporter: github-pr-annotations - filter_mode: diff_context checkstyle_config: ./dbeaver-checkstyle-config.xml - fail_on_error: true + + # - uses: dbelyaev/action-checkstyle@master + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # reporter: github-pr-annotations + # filter_mode: diff_context + # checkstyle_config: ./dbeaver-checkstyle-config.xml + # fail_on_error: true diff --git a/.github/workflows/mvn-package.yml b/.github/workflows/mvn-package.yml index 76a8bfd..8f810d4 100644 --- a/.github/workflows/mvn-package.yml +++ b/.github/workflows/mvn-package.yml @@ -61,7 +61,7 @@ jobs: project_deps_path: ${{ inputs.project-deps }} token: ${{ secrets.DEVOPS_ISSUE_RO_TOKEN }} - - uses: wroud/github-actions/install-maven@56f30609ac22a9ad021852a820ad04857208fe7b + - uses: dbeaver/github-actions/install-maven@devel - name: Set up JDK 17 uses: actions/setup-java@v4 diff --git a/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java b/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java index 48c95d2..3686e03 100644 --- a/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java +++ b/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java @@ -58,7 +58,7 @@ public CallableStatement prepareCall(String sql) throws SQLException { } @Override - public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { + public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { // trigger checkstyle check throw new SQLFeatureNotSupportedException(); } From b9c6bd4bac7a163563083c97acb52deee33dd73c Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 00:17:15 +0800 Subject: [PATCH 16/30] dbeaver/dbeaver-devops#1525 try checkstyle 2 --- .github/workflows/java-checkstyle.yml | 2 +- .github/workflows/mvn-package.yml | 5 +---- .../src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index 5868908..16273ab 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -44,7 +44,7 @@ jobs: java-version: "17" cache: maven - - uses: Wroud/github-actions/java-checkstyle@013a4ecdb9d0a654b2636b09678d05a6ca9eede7 + - uses: Wroud/github-actions/java-checkstyle@87daa273559a7ec68e4e18e9d552226edc89890b with: checkstyle_config: ./dbeaver-checkstyle-config.xml diff --git a/.github/workflows/mvn-package.yml b/.github/workflows/mvn-package.yml index 8f810d4..7980b9c 100644 --- a/.github/workflows/mvn-package.yml +++ b/.github/workflows/mvn-package.yml @@ -34,10 +34,7 @@ concurrency: jobs: build-and-test: name: Build - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest timeout-minutes: ${{ inputs.timeout-minutes }} permissions: contents: read diff --git a/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java b/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java index 3686e03..c7a52f5 100644 --- a/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java +++ b/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java @@ -58,7 +58,7 @@ public CallableStatement prepareCall(String sql) throws SQLException { } @Override - public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { // trigger checkstyle check + public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { // trigger checkstyle throw new SQLFeatureNotSupportedException(); } From f8f02021382d4d582cdb66a0e738635a905c94d6 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 00:25:04 +0800 Subject: [PATCH 17/30] dbeaver/dbeaver-devops#1525 try checkstyle 3 --- .github/workflows/java-checkstyle.yml | 2 +- .../src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index 16273ab..483cb9b 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -44,7 +44,7 @@ jobs: java-version: "17" cache: maven - - uses: Wroud/github-actions/java-checkstyle@87daa273559a7ec68e4e18e9d552226edc89890b + - uses: Wroud/github-actions/java-checkstyle@78998f6de835e929c0bcb5fbe2eefeb0899d0c0c with: checkstyle_config: ./dbeaver-checkstyle-config.xml diff --git a/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java b/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java index c7a52f5..3686e03 100644 --- a/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java +++ b/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java @@ -58,7 +58,7 @@ public CallableStatement prepareCall(String sql) throws SQLException { } @Override - public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { // trigger checkstyle + public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { // trigger checkstyle check throw new SQLFeatureNotSupportedException(); } From 064ce0586adaef2827994a6907ab41d107b69218 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 00:33:25 +0800 Subject: [PATCH 18/30] dbeaver/dbeaver-devops#1525 try checkstyle 4 --- .github/workflows/java-checkstyle.yml | 3 ++- .../src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index 483cb9b..b7d20db 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -44,9 +44,10 @@ jobs: java-version: "17" cache: maven - - uses: Wroud/github-actions/java-checkstyle@78998f6de835e929c0bcb5fbe2eefeb0899d0c0c + - uses: Wroud/github-actions/java-checkstyle@ef9739614fe639609a150b2cf5ec86e5b7ac51d1 with: checkstyle_config: ./dbeaver-checkstyle-config.xml + checkstyle_version: '10.12.0' # - uses: dbelyaev/action-checkstyle@master # with: diff --git a/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java b/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java index 3686e03..c7a52f5 100644 --- a/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java +++ b/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java @@ -58,7 +58,7 @@ public CallableStatement prepareCall(String sql) throws SQLException { } @Override - public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { // trigger checkstyle check + public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { // trigger checkstyle throw new SQLFeatureNotSupportedException(); } From 76c08e4c38718fd185e63062d0b0131e08f95af3 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 00:38:19 +0800 Subject: [PATCH 19/30] dbeaver/dbeaver-devops#1525 try checkstyle 5 --- .github/workflows/java-checkstyle.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index b7d20db..e70888e 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -35,16 +35,7 @@ jobs: - name: Remove checkstyle config directory run: rm -rf dbeaver-config - - uses: dbeaver/github-actions/install-maven@devel - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: "temurin" - java-version: "17" - cache: maven - - - uses: Wroud/github-actions/java-checkstyle@ef9739614fe639609a150b2cf5ec86e5b7ac51d1 + - uses: Wroud/github-actions/java-checkstyle@271a157838b728e5befdadbdd6fba367a44cbe57 with: checkstyle_config: ./dbeaver-checkstyle-config.xml checkstyle_version: '10.12.0' From 1df7f4f8919b8e69b0d6c8792dcb0935833c27be Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 00:41:37 +0800 Subject: [PATCH 20/30] dbeaver/dbeaver-devops#1525 try checkstyle 6 --- .github/workflows/java-checkstyle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index e70888e..755a118 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -35,7 +35,7 @@ jobs: - name: Remove checkstyle config directory run: rm -rf dbeaver-config - - uses: Wroud/github-actions/java-checkstyle@271a157838b728e5befdadbdd6fba367a44cbe57 + - uses: Wroud/github-actions/java-checkstyle@9c650e5fec47f08b3f8695ced420d538393e9834 with: checkstyle_config: ./dbeaver-checkstyle-config.xml checkstyle_version: '10.12.0' From 10dcdacb36531a77a4f967a533bdc32fece7f46b Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 00:45:44 +0800 Subject: [PATCH 21/30] dbeaver/dbeaver-devops#1525 try checkstyle 7 --- .github/workflows/java-checkstyle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index 755a118..7743a2a 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -35,7 +35,7 @@ jobs: - name: Remove checkstyle config directory run: rm -rf dbeaver-config - - uses: Wroud/github-actions/java-checkstyle@9c650e5fec47f08b3f8695ced420d538393e9834 + - uses: Wroud/github-actions/java-checkstyle@dc56d38bf98f2aa7e4282ea4d465f596028131e6 with: checkstyle_config: ./dbeaver-checkstyle-config.xml checkstyle_version: '10.12.0' From 5c7498eaeccb41b089ad759f243dfaa5dc396738 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 00:53:32 +0800 Subject: [PATCH 22/30] dbeaver/dbeaver-devops#1525 try checkstyle 8 --- .github/workflows/java-checkstyle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index 7743a2a..15875de 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -35,7 +35,7 @@ jobs: - name: Remove checkstyle config directory run: rm -rf dbeaver-config - - uses: Wroud/github-actions/java-checkstyle@dc56d38bf98f2aa7e4282ea4d465f596028131e6 + - uses: Wroud/github-actions/java-checkstyle@038f8c3da9537d95f31d472f49e130b43d027912 with: checkstyle_config: ./dbeaver-checkstyle-config.xml checkstyle_version: '10.12.0' From 1a545e60d50e3363c01d463261a86c975ea41897 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 00:55:21 +0800 Subject: [PATCH 23/30] dbeaver/dbeaver-devops#1525 use dbelyaev/action-checkstyle@master --- .github/workflows/java-checkstyle.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index 15875de..599854a 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -35,15 +35,14 @@ jobs: - name: Remove checkstyle config directory run: rm -rf dbeaver-config - - uses: Wroud/github-actions/java-checkstyle@038f8c3da9537d95f31d472f49e130b43d027912 - with: - checkstyle_config: ./dbeaver-checkstyle-config.xml - checkstyle_version: '10.12.0' - - # - uses: dbelyaev/action-checkstyle@master + # - uses: Wroud/github-actions/java-checkstyle@038f8c3da9537d95f31d472f49e130b43d027912 # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # reporter: github-pr-annotations - # filter_mode: diff_context # checkstyle_config: ./dbeaver-checkstyle-config.xml - # fail_on_error: true + # checkstyle_version: '10.12.0' + + - uses: dbelyaev/action-checkstyle@master + with: + reporter: github-pr-annotations + filter_mode: diff_context + checkstyle_config: ./dbeaver-checkstyle-config.xml + fail_on_error: true From 737dbf59706ad4752bed127037b4eae9c35f4dcc Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 00:58:01 +0800 Subject: [PATCH 24/30] dbeaver/dbeaver-devops#1525 revert checkstyle trigger --- .../src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java b/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java index c7a52f5..48c95d2 100644 --- a/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java +++ b/modules/com.dbeaver.jdbc.api/src/com/dbeaver/jdbc/model/AbstractJdbcConnection.java @@ -58,7 +58,7 @@ public CallableStatement prepareCall(String sql) throws SQLException { } @Override - public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { // trigger checkstyle + public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { throw new SQLFeatureNotSupportedException(); } From 52c7dd9ca400339c847e79c54acf79884f601c29 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 00:59:15 +0800 Subject: [PATCH 25/30] dbeaver/dbeaver-devops#1525 remove comment --- .github/workflows/java-checkstyle.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index 599854a..dd123ff 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -35,11 +35,6 @@ jobs: - name: Remove checkstyle config directory run: rm -rf dbeaver-config - # - uses: Wroud/github-actions/java-checkstyle@038f8c3da9537d95f31d472f49e130b43d027912 - # with: - # checkstyle_config: ./dbeaver-checkstyle-config.xml - # checkstyle_version: '10.12.0' - - uses: dbelyaev/action-checkstyle@master with: reporter: github-pr-annotations From edfad2cc4be98ca2ddad7e08630ea9d4dcfbf51e Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 01:03:21 +0800 Subject: [PATCH 26/30] dbeaver/dbeaver-devops#1525 move checkstyle config from dbeaver repo --- .github/workflows/java-checkstyle.yml | 14 +- dbeaver-checkstyle-config.xml | 363 ++++++++++++++++++++++++++ 2 files changed, 364 insertions(+), 13 deletions(-) create mode 100644 dbeaver-checkstyle-config.xml diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index dd123ff..5d035e7 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -23,21 +23,9 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Checkout checkstyle config repository - uses: actions/checkout@v4 - with: - repository: dbeaver/dbeaver - path: dbeaver-config - - - name: Copy checkstyle config - run: cp dbeaver-config/dbeaver-checkstyle-config.xml ./dbeaver-checkstyle-config.xml - - - name: Remove checkstyle config directory - run: rm -rf dbeaver-config - - uses: dbelyaev/action-checkstyle@master with: reporter: github-pr-annotations filter_mode: diff_context - checkstyle_config: ./dbeaver-checkstyle-config.xml + checkstyle_config: ../dbeaver-common/dbeaver-checkstyle-config.xml fail_on_error: true diff --git a/dbeaver-checkstyle-config.xml b/dbeaver-checkstyle-config.xml new file mode 100644 index 0000000..ca7de3d --- /dev/null +++ b/dbeaver-checkstyle-config.xml @@ -0,0 +1,363 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 9279d81c22342d229be9cda138158e86c5ef8ce6 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 01:07:07 +0800 Subject: [PATCH 27/30] dbeaver/dbeaver-devops#1525 clone dbeaver-common for checkstyle config --- .github/workflows/java-checkstyle.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index 5d035e7..d90ccec 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -23,9 +23,21 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Checkout checkstyle config repository + uses: actions/checkout@v4 + with: + repository: dbeaver/dbeaver-common + path: dbeaver-config + + - name: Copy checkstyle config + run: cp dbeaver-config/dbeaver-checkstyle-config.xml ./dbeaver-checkstyle-config.xml + + - name: Remove checkstyle config directory + run: rm -rf dbeaver-config + - uses: dbelyaev/action-checkstyle@master with: reporter: github-pr-annotations filter_mode: diff_context - checkstyle_config: ../dbeaver-common/dbeaver-checkstyle-config.xml + checkstyle_config: ./dbeaver-checkstyle-config.xml fail_on_error: true From fdd4307138e52641ebe3102f2c8b8dc011b5f9cd Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 01:17:22 +0800 Subject: [PATCH 28/30] dbeaver/dbeaver-devops#1525 use fork for checkstyle action --- .github/workflows/java-checkstyle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index d90ccec..d24f262 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -35,7 +35,7 @@ jobs: - name: Remove checkstyle config directory run: rm -rf dbeaver-config - - uses: dbelyaev/action-checkstyle@master + - uses: dbeaver/action-java-checkstyle@master with: reporter: github-pr-annotations filter_mode: diff_context From 2f845841341f26c1f58775831e6c841903f10ae6 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 01:44:47 +0800 Subject: [PATCH 29/30] dbeaver/dbeaver-devops#1525 simplify workflow --- .github/workflows/java-checkstyle.yml | 8 +++----- .github/workflows/mvn-package.yml | 10 +++------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index d24f262..4ba59c6 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -29,11 +29,9 @@ jobs: repository: dbeaver/dbeaver-common path: dbeaver-config - - name: Copy checkstyle config - run: cp dbeaver-config/dbeaver-checkstyle-config.xml ./dbeaver-checkstyle-config.xml - - - name: Remove checkstyle config directory - run: rm -rf dbeaver-config + - run: | + cp dbeaver-config/dbeaver-checkstyle-config.xml ./dbeaver-checkstyle-config.xml + rm -rf dbeaver-config - uses: dbeaver/action-java-checkstyle@master with: diff --git a/.github/workflows/mvn-package.yml b/.github/workflows/mvn-package.yml index 7980b9c..50db6b4 100644 --- a/.github/workflows/mvn-package.yml +++ b/.github/workflows/mvn-package.yml @@ -46,22 +46,18 @@ jobs: - name: Set repository path variable run: echo "CHECKOUT_PATH=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - - name: Checkout repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 with: path: ${{ env.CHECKOUT_PATH || '.' }} - - name: Clone Deps Repositories + - uses: dbeaver/github-actions/clone-repositories@devel if: ${{ inputs.project-deps != null }} - uses: dbeaver/github-actions/clone-repositories@devel with: project_deps_path: ${{ inputs.project-deps }} token: ${{ secrets.DEVOPS_ISSUE_RO_TOKEN }} - uses: dbeaver/github-actions/install-maven@devel - - - name: Set up JDK 17 - uses: actions/setup-java@v4 + - uses: actions/setup-java@v4 with: distribution: "temurin" java-version: "17" From b58cff9a8cbf43a952ffeb72782228c141fa2a15 Mon Sep 17 00:00:00 2001 From: Aleksei Potsetsuev Date: Tue, 15 Oct 2024 18:03:15 +0800 Subject: [PATCH 30/30] dbeaver/dbeaver-devops#1525 move checkstyle file --- .../dbeaver-checkstyle-config.xml | 0 .github/workflows/java-checkstyle.yml | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename dbeaver-checkstyle-config.xml => .github/dbeaver-checkstyle-config.xml (100%) diff --git a/dbeaver-checkstyle-config.xml b/.github/dbeaver-checkstyle-config.xml similarity index 100% rename from dbeaver-checkstyle-config.xml rename to .github/dbeaver-checkstyle-config.xml diff --git a/.github/workflows/java-checkstyle.yml b/.github/workflows/java-checkstyle.yml index 4ba59c6..92311cd 100644 --- a/.github/workflows/java-checkstyle.yml +++ b/.github/workflows/java-checkstyle.yml @@ -27,11 +27,11 @@ jobs: uses: actions/checkout@v4 with: repository: dbeaver/dbeaver-common - path: dbeaver-config + path: dbeaver-common - run: | - cp dbeaver-config/dbeaver-checkstyle-config.xml ./dbeaver-checkstyle-config.xml - rm -rf dbeaver-config + cp dbeaver-common/.github/dbeaver-checkstyle-config.xml ./dbeaver-checkstyle-config.xml + rm -rf dbeaver-common - uses: dbeaver/action-java-checkstyle@master with: