diff --git a/.github/workflows/QA_keystore.jks b/.github/workflows/QA_keystore.jks deleted file mode 100644 index 2b8fb9bc231..00000000000 Binary files a/.github/workflows/QA_keystore.jks and /dev/null differ diff --git a/.github/workflows/QA_keystore.jks.license b/.github/workflows/QA_keystore.jks.license deleted file mode 100644 index 7ec21443136..00000000000 --- a/.github/workflows/QA_keystore.jks.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors -SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 98d35c0a048..15aba335b21 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -8,6 +8,8 @@ # SPDX-FileCopyrightText: 2025 Marcel Hibbe # SPDX-License-Identifier: GPL-3.0-or-later +#TESTTEST + name: "Analysis" on: @@ -21,12 +23,12 @@ permissions: contents: write concurrency: - group: analysis-wrapper-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: analysis: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Disabled on forks if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }} diff --git a/.github/workflows/analysis_self_hosted.yml b/.github/workflows/analysis_self_hosted.yml new file mode 100644 index 00000000000..82034d8b98a --- /dev/null +++ b/.github/workflows/analysis_self_hosted.yml @@ -0,0 +1,90 @@ +# synced from @nextcloud/android-config + +# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-FileCopyrightText: 2025 Alper Ozturk +# SPDX-FileCopyrightText: 2023 Tobias Kaminsky +# SPDX-FileCopyrightText: 2023 Andy Scherzinger +# SPDX-FileCopyrightText: 2023 Josh Richards +# SPDX-FileCopyrightText: 2025 Marcel Hibbe +# SPDX-License-Identifier: GPL-3.0-or-later + +#TESTTEST + +name: "Analysis Self-Hosted" + +on: + pull_request: + branches: [ "master", "main", "stable-*" ] + push: + branches: [ "master", "main", "stable-*" ] + +permissions: + pull-requests: write + contents: write + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + analysis: + runs-on: [ubuntu-latest, self-hosted] + steps: + - name: Disabled on forks + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }} + run: | + echo 'Can not analyze PRs from forks' + exit 1 + + - name: Setup variables # zizmor: ignore[template-injection] + id: get-vars + run: | + if [ -z "$GITHUB_HEAD_REF" ]; then + # push + { + echo "branch=$GITHUB_REF_NAME" + echo "pr=$GITHUB_RUN_ID" + echo "repo=${{ github.repository }}" + } >> "$GITHUB_OUTPUT" + else + # pull request + { + echo "branch=$GITHUB_HEAD_REF" + echo "pr=${{ github.event.pull_request.number }}" + echo "repo=${{ github.event.pull_request.head.repo.full_name }}" + } >> "$GITHUB_OUTPUT" + fi + + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + persist-credentials: false + repository: ${{ steps.get-vars.outputs.repo }} + ref: ${{ steps.get-vars.outputs.branch }} + + - name: Set up JDK 17 + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 + with: + distribution: "temurin" + java-version: 17 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 + + - name: Install dependencies + run: | + sudo apt install python3-defusedxml + + - name: Run analysis wrapper + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Memory that is set in jvmargs must be wisely chosen. + # E.g. with -Xmx5g and -Xmx1g android talk builds always failed with "The operation was canceled". -Xmx3g seems to work so far. + run: | + mkdir -p "$HOME/.gradle" + { + echo "org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" + echo "org.gradle.configureondemand=true" + echo "kapt.incremental.apt=true" + } > "$HOME/.gradle/gradle.properties" + scripts/analysis/analysis-wrapper.sh "${{ steps.get-vars.outputs.branch }}" "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" "$GITHUB_RUN_NUMBER" "${{ steps.get-vars.outputs.pr }}" diff --git a/.github/workflows/autoApproveSync.yml b/.github/workflows/autoApproveSync.yml deleted file mode 100644 index c215be0b3e8..00000000000 --- a/.github/workflows/autoApproveSync.yml +++ /dev/null @@ -1,40 +0,0 @@ -# synced from @nextcloud/android-config - -# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023 Álvaro Brey -# SPDX-License-Identifier: GPL-3.0-or-later - -name: Auto approve sync -on: - pull_request_target: # zizmor: ignore[dangerous-triggers] - branches: - - master - - main - types: - - opened - - reopened - - synchronize - - labeled - -concurrency: - group: sync-approve-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - pull-requests: write - -jobs: - auto-approve: - name: Auto approve sync - runs-on: ubuntu-latest - if: ${{ contains(github.event.pull_request.labels.*.name, 'sync') && github.actor == 'nextcloud-android-bot' }} - steps: - - name: Disabled on forks - if: ${{ github.event.pull_request.head.repo.full_name != github.repository }} - run: | - echo 'Can not approve PRs from forks' - exit 1 - - - uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index bcd48854e51..00000000000 --- a/.github/workflows/check.yml +++ /dev/null @@ -1,37 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Check - -on: - pull_request: - branches: [ master, stable-* ] - -# Declare default permissions as read only. -permissions: read-all - -concurrency: - group: check-kotlin-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - check: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - task: [ detekt, ktlintCheck ] - steps: - - name: Checkout - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - persist-credentials: false - - - name: Set up JDK 17 - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - with: - distribution: "temurin" - java-version: 17 - - - name: Check ${{ matrix.task }} - run: ./gradlew ${{ matrix.task }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 1af0818ddc4..00000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,60 +0,0 @@ -# synced from @nextcloud/android-config - -# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023-2024 Andy Scherzinger -# SPDX-FileCopyrightText: 2022 Tobias Kaminsky -# SPDX-FileCopyrightText: 2022 Álvaro Brey -# SPDX-FileCopyrightText: 2025 Marcel Hibbe -# SPDX-License-Identifier: GPL-3.0-or-later - -name: "CodeQL" - -on: - push: - branches: [ "master", "main", "stable-*" ] - pull_request: - branches: [ "master", "main" ] - schedule: - - cron: '24 18 * * 3' - -permissions: - contents: read - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - strategy: - fail-fast: false - matrix: - language: [ 'java' ] - steps: - - name: Checkout repository - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - persist-credentials: false - - name: Set Swap Space - if: runner.environment == 'github-hosted' - uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c # v1.0 - with: - swap-size-gb: 10 - - name: Initialize CodeQL - uses: github/codeql-action/init@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5 - with: - languages: ${{ matrix.language }} - - name: Set up JDK 17 - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - with: - distribution: "temurin" - java-version: 17 - - name: Assemble - run: | - mkdir -p "$HOME/.gradle" - echo "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties" - ./gradlew assembleDebug - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5 diff --git a/.github/workflows/detectNewJavaFiles.yml b/.github/workflows/detectNewJavaFiles.yml deleted file mode 100644 index 908e3fd288f..00000000000 --- a/.github/workflows/detectNewJavaFiles.yml +++ /dev/null @@ -1,43 +0,0 @@ -# synced from @nextcloud/android-config - -# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023 Andy Scherzinger -# SPDX-FileCopyrightText: 2022 Tobias Kaminsky -# SPDX-FileCopyrightText: 2022 Álvaro Brey -# SPDX-License-Identifier: GPL-3.0-or-later - -name: "Detect new java files" - -on: - pull_request: - branches: [ master, main, stable-* ] - -permissions: read-all - -concurrency: - group: detect-new-java-files-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - detectNewJavaFiles: - runs-on: ubuntu-latest - steps: - - id: file_changes - uses: trilom/file-changes-action@a6ca26c14274c33b15e6499323aac178af06ad4b # v1.2.4 - with: - output: ',' - - name: Detect new java files - run: | - if [ -z '${{ steps.file_changes.outputs.files_added }}' ]; then - echo "No new files added" - exit 0 - fi - new_java=$(echo '${{ steps.file_changes.outputs.files_added }}' | tr ',' '\n' | grep '\.java$' | cat) - if [ -n "$new_java" ]; then - # shellcheck disable=SC2016 - printf 'New java files detected:\n```\n%s\n```\n' "$new_java" | tee "$GITHUB_STEP_SUMMARY" - exit 1 - else - echo "No new java files detected" - exit 0 - fi diff --git a/.github/workflows/fixup.yml b/.github/workflows/fixup.yml deleted file mode 100644 index 69da2bbb039..00000000000 --- a/.github/workflows/fixup.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -# -# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Block fixup and squash commits - -on: - pull_request: - types: [opened, ready_for_review, reopened, synchronize] - -permissions: - contents: read - -concurrency: - group: fixup-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - commit-message-check: - if: github.event.pull_request.draft == false - - permissions: - pull-requests: write - name: Block fixup and squash commits - - runs-on: ubuntu-latest-low - - steps: - - name: Run check - uses: skjnldsv/block-fixup-merge-action@c138ea99e45e186567b64cf065ce90f7158c236a # v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lib.sh.license b/.github/workflows/lib.sh.license deleted file mode 100644 index 162c96150eb..00000000000 --- a/.github/workflows/lib.sh.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-FileCopyrightText: 2019-2025 Nextcloud GmbH and Nextcloud contributors -SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only diff --git a/.github/workflows/pr-feedback.yml b/.github/workflows/pr-feedback.yml deleted file mode 100644 index 3851ae450e9..00000000000 --- a/.github/workflows/pr-feedback.yml +++ /dev/null @@ -1,55 +0,0 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization - -# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023 Marcel Klehr -# SPDX-FileCopyrightText: 2023 Joas Schilling <213943+nickvergessen@users.noreply.github.com> -# SPDX-FileCopyrightText: 2023 Daniel Kesselberg -# SPDX-FileCopyrightText: 2023 Florian Steffens -# SPDX-License-Identifier: MIT - -name: 'Ask for feedback on PRs' -on: - schedule: - - cron: '30 1 * * *' - -permissions: - contents: read - pull-requests: write - -jobs: - pr-feedback: - if: ${{ github.repository_owner == 'nextcloud' }} - runs-on: ubuntu-latest - steps: - - name: The get-github-handles-from-website action - uses: marcelklehr/get-github-handles-from-website-action@06b2239db0a48fe1484ba0bfd966a3ab81a08308 # v1.0.1 - id: scrape - with: - website: 'https://nextcloud.com/team/' - - - name: Get blocklist - id: blocklist - run: | - blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -) - echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT" - - - uses: nextcloud/pr-feedback-action@e397f3c7e655092b746e3610d121545530c6a90e # main - with: - feedback-message: | - Hello there, - Thank you so much for taking the time and effort to create a pull request to our Nextcloud project. - - We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. - - Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 - - Thank you for contributing to Nextcloud and we hope to hear from you soon! - - (If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).) - days-before-feedback: 14 - start-date: '2024-04-30' - exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }}' - exempt-bots: true diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml deleted file mode 100644 index c753164383d..00000000000 --- a/.github/workflows/qa.yml +++ /dev/null @@ -1,55 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023 Andy Scherzinger -# SPDX-License-Identifier: MIT -name: "QA" - -on: - pull_request: - branches: [ main, master, stable-* ] - -permissions: - pull-requests: write - contents: read - -concurrency: - group: qa-build-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - qa: - runs-on: ubuntu-latest - steps: - - name: Check if secrets are available - run: echo "ok=${{ secrets.KS_PASS != '' }}" >> "$GITHUB_OUTPUT" - id: check-secrets - - - name: Checkout - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - if: ${{ steps.check-secrets.outputs.ok == 'true' }} - with: - persist-credentials: false - - - name: set up JDK 17 - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - if: ${{ steps.check-secrets.outputs.ok == 'true' }} - with: - distribution: "temurin" - java-version: 17 - - - name: Build QA - if: ${{ steps.check-secrets.outputs.ok == 'true' }} - env: - KS_PASS: ${{ secrets.KS_PASS }} - KEY_PASS: ${{ secrets.KEY_PASS }} - LOG_USERNAME: ${{ secrets.LOG_USERNAME }} - LOG_PASSWORD: ${{ secrets.LOG_PASSWORD }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - mkdir -p "$HOME/.gradle" - echo "org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g" > "$HOME/.gradle/gradle.properties" - echo "org.gradle.caching=true; org.gradle.parallel=true; org.gradle.configureondemand=true; kapt.incremental.apt=true" >> "$HOME/.gradle/gradle.properties" - sed -i "/qa/,/\}/ s/versionCode .*/versionCode ${{github.event.number}} /" "app/build.gradle" - sed -i "/qa/,/\}/ s/versionName .*/versionName \"${{github.event.number}}\"/" "app/build.gradle" - ./gradlew assembleQaDebug - $(find /usr/local/lib/android/sdk/build-tools/*/apksigner | sort | tail -n1) sign --ks-pass pass:"$KS_PASS" --key-pass pass:"$KEY_PASS" --ks-key-alias key0 --ks ".github/workflows/QA_keystore.jks" app/build/outputs/apk/qa/debug/*qa-debug*.apk - .github/workflows/uploadArtifact.sh "$LOG_USERNAME" "$LOG_PASSWORD" "${{github.event.number}}" "${{github.event.number}}" "$GITHUB_TOKEN" diff --git a/.github/workflows/renovate-approve-merge.yml b/.github/workflows/renovate-approve-merge.yml deleted file mode 100644 index c6f0dc0c0a7..00000000000 --- a/.github/workflows/renovate-approve-merge.yml +++ /dev/null @@ -1,61 +0,0 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -# -# SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Auto approve renovate PRs - -on: - pull_request_target: # zizmor: ignore[dangerous-triggers] - branches: - - main - - master - - stable* - -permissions: - contents: read - -concurrency: - group: renovate-approve-merge-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - auto-approve-merge: - if: github.event.pull_request.user.login == 'renovate[bot]' - runs-on: ubuntu-latest - permissions: - # for hmarr/auto-approve-action to approve PRs - pull-requests: write - - steps: - - name: Disabled on forks - if: ${{ github.event.pull_request.head.repo.full_name != github.repository }} - run: | - echo 'Can not approve PRs from forks' - exit 1 - - - uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0 - id: branchname - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - # GitHub actions bot approve - - uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0 - if: github.actor == 'renovate[bot]' - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - ref: ${{ github.head_ref }} - - # Enable GitHub auto merge - - name: Enable Pull Request Automerge - if: github.actor == 'renovate[bot]' - run: gh pr merge --merge --auto - env: - GH_TOKEN: ${{ secrets.AUTOMERGE }} - diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml deleted file mode 100644 index d65f3b0cb30..00000000000 --- a/.github/workflows/reuse.yml +++ /dev/null @@ -1,27 +0,0 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization - -# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. -# -# SPDX-License-Identifier: CC0-1.0 - -name: REUSE Compliance Check - -on: [pull_request] - -permissions: - contents: read - -jobs: - reuse-compliance-check: - runs-on: ubuntu-latest-low - steps: - - name: Checkout - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - persist-credentials: false - - - name: REUSE Compliance Check - uses: fsfe/reuse-action@676e2d560c9a403aa252096d99fcab3e1132b0f5 # v6.0.0 diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml deleted file mode 100644 index 9871c2721c5..00000000000 --- a/.github/workflows/scorecard.yml +++ /dev/null @@ -1,47 +0,0 @@ -# synced from @nextcloud/android-config - -# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023 Andy Scherzinger -# SPDX-License-Identifier: GPL-3.0-or-later - -name: Scorecard supply-chain security -on: - branch_protection_rule: - schedule: - - cron: '32 23 * * 4' - push: - branches: [ "main", "master" ] - -# Declare default permissions as read only. -permissions: read-all - -concurrency: - group: scorecard-supply-chain-security-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - analysis: - name: Scorecard analysis - runs-on: ubuntu-latest - permissions: - # Needed to upload the results to code-scanning dashboard. - security-events: write - - steps: - - name: "Checkout code" - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - persist-credentials: false - - - name: "Run analysis" - uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 - with: - results_file: results.sarif - results_format: sarif - publish_results: false - - # Upload the results to GitHub's code scanning dashboard. - - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5 - with: - sarif_file: results.sarif diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 34be2a35dc5..00000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,35 +0,0 @@ -# synced from @nextcloud/android-config - -# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2023 Tobias Kaminsky -# SPDX-FileCopyrightText: 2022 Álvaro Brey -# SPDX-License-Identifier: GPL-3.0-or-later - -name: 'Close stale issues' -on: - schedule: - - cron: '0 0 * * *' - -# Declare default permissions as read only. -permissions: read-all - -jobs: - stale: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0 - with: - days-before-stale: 28 - days-before-close: 14 - days-before-pr-close: -1 - only-labels: 'bug,needs info' - exempt-issue-labels: 'no-stale' - stale-issue-message: >- - This bug report did not receive an update in the last 4 weeks. - Please take a look again and update the issue with new details, - otherwise the issue will be automatically closed in 2 weeks. Thank you! - exempt-all-pr-milestones: true - labels-to-remove-when-unstale: 'needs info' diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml deleted file mode 100644 index 3786f259baf..00000000000 --- a/.github/workflows/unit-tests.yml +++ /dev/null @@ -1,46 +0,0 @@ -# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: MIT - -name: Unit tests - -on: - pull_request: - branches: [ master, main, stable-* ] - push: - branches: [ master, main, stable-* ] - -permissions: - contents: read - pull-requests: write - -concurrency: - group: unit-tests-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - with: - persist-credentials: false - - - name: Set up JDK 17 - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - with: - distribution: "temurin" - java-version: 17 - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 - - - name: Run unit tests with coverage - run: ./gradlew testGplayDebugUnit - - - name: Upload test artifacts - if: ${{ failure() }} - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 - with: - name: test-results - path: app/build/reports/tests/testGplayDebugUnitTest/ diff --git a/scripts/analysis/analysis-wrapper.sh b/scripts/analysis/analysis-wrapper.sh index 47e42258f3e..52e16dddaba 100755 --- a/scripts/analysis/analysis-wrapper.sh +++ b/scripts/analysis/analysis-wrapper.sh @@ -18,7 +18,10 @@ ruby scripts/analysis/lint-up.rb lintValue=$? curl "https://www.kaminsky.me/nc-dev/$repository-findbugs/$stableBranch.xml" -o "/tmp/$stableBranch.xml" + +echo "Before spotbugs" ruby scripts/analysis/spotbugs-up.rb "$stableBranch" +echo "After spotbugs" spotbugsValue=$? # exit codes: diff --git a/scripts/analysis/lint-up.rb b/scripts/analysis/lint-up.rb index c52b60f1370..516c7d9b8bf 100644 --- a/scripts/analysis/lint-up.rb +++ b/scripts/analysis/lint-up.rb @@ -61,7 +61,7 @@ # run Lint puts "running Lint..." -system './gradlew clean lintGplayDebug 1>/dev/null' +system './gradlew --no-daemon --no-configuration-cache clean lintGplayDebug 1>/dev/null' # confirm that Lint ran w/out error result = $?.to_i diff --git a/scripts/analysis/spotbugs-up.rb b/scripts/analysis/spotbugs-up.rb index d7582d2b064..626a5b68ffc 100755 --- a/scripts/analysis/spotbugs-up.rb +++ b/scripts/analysis/spotbugs-up.rb @@ -26,6 +26,8 @@ current_warning_count = `./scripts/analysis/spotbugsSummary.py --total`.to_i puts "found warnings: " + current_warning_count.to_s +exit 0 + # get warning counts from target branch previous_xml = "/tmp/#{base_branch}.xml" previous_results = File.file?(previous_xml)