diff --git a/.github/workflows/backend-lint.yml b/.github/workflows/backend-lint.yml deleted file mode 100644 index 0ebfbf4fb6..0000000000 --- a/.github/workflows/backend-lint.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Backend Lint - -on: - # Allows you to reuse workflows by referencing their YAML files - workflow_call: - inputs: - skip_cache: - required: false - type: string - -jobs: - lint: - name: Lint - timeout-minutes: 5 - runs-on: ubuntu-latest - - 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-review - filter_mode: diff_context - checkstyle_config: ./dbeaver-checkstyle-config.xml - fail_on_error: true diff --git a/.github/workflows/common-cleanup.yml b/.github/workflows/common-cleanup.yml index 0a1dd1c03b..9acd34dd17 100644 --- a/.github/workflows/common-cleanup.yml +++ b/.github/workflows/common-cleanup.yml @@ -1,4 +1,4 @@ -name: Cleanup checks +name: Cleanup on: pull_request: @@ -9,25 +9,6 @@ on: 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' }} + name: Cleanup + uses: dbeaver/dbeaver-common/.github/workflows/cleanup-caches.yml@devel + secrets: inherit diff --git a/.github/workflows/push-pr-devel.yml b/.github/workflows/push-pr-devel.yml index 1aecfdb7a9..bd93698033 100644 --- a/.github/workflows/push-pr-devel.yml +++ b/.github/workflows/push-pr-devel.yml @@ -2,7 +2,10 @@ name: CI on: pull_request: - branches: [devel] + types: + - opened + - synchronize + - reopened push: branches: [devel] @@ -28,7 +31,7 @@ jobs: lint-server: name: Server - uses: ./.github/workflows/backend-lint.yml + uses: dbeaver/dbeaver-common/.github/workflows/java-checkstyle.yml@devel secrets: inherit lint-frontend: diff --git a/.vscode/settings.json b/.vscode/settings.json index 8bcd065996..a039fe497d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -46,6 +46,6 @@ "*.css": "postcss" }, - "java.checkstyle.configuration": "${workspaceFolder}/../dbeaver-common/dbeaver-checkstyle-config.xml", + "java.checkstyle.configuration": "${workspaceFolder}/../dbeaver-common/.github/dbeaver-checkstyle-config.xml", "java.checkstyle.version": "10.12.0" }