From 2c6605b75db3eb8fab9ac88f6666867fbc54e3e8 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 20 Sep 2026 15:12:08 -0300 Subject: [PATCH 01/12] feat: add reusable lint-typescript workflow --- .github/workflows/lint-typescript.yml | 92 +++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 .github/workflows/lint-typescript.yml diff --git a/.github/workflows/lint-typescript.yml b/.github/workflows/lint-typescript.yml new file mode 100644 index 0000000..4ab837a --- /dev/null +++ b/.github/workflows/lint-typescript.yml @@ -0,0 +1,92 @@ +# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors +# SPDX-License-Identifier: MIT + +name: Type checking + +on: + workflow_call: + +permissions: + contents: read + +concurrency: + group: lint-typescript-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + changes: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + outputs: + src: ${{ steps.changes.outputs.src }} + steps: + - name: Detect TypeScript changes + id: changes + uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 + continue-on-error: true + with: + filters: | + src: + - '.github/workflows/**' + - 'package.json' + - 'package-lock.json' + - 'tsconfig.json' + - '**.ts' + - '**.vue' + + test: + runs-on: ubuntu-latest + needs: changes + if: needs.changes.outputs.src != 'false' + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Read package.json engines + id: versions + uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 + with: + fallbackNode: '^24' + fallbackNpm: '^11.3' + + - name: Set up node ${{ steps.versions.outputs.nodeVersion }} + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: ${{ steps.versions.outputs.nodeVersion }} + + - name: Set up npm ${{ steps.versions.outputs.npmVersion }} + run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' + + - name: Install dependencies + env: + CYPRESS_INSTALL_BINARY: 0 + run: npm ci + + - name: Check types + run: | + npm run --if-present check-types + npm run --if-present ts:check + + summary: + permissions: + contents: none + runs-on: ubuntu-latest + needs: + - changes + - test + if: always() + name: typescript-summary + steps: + - name: Summary status + env: + CHANGED: ${{ needs.changes.outputs.src }} + TEST_RESULT: ${{ needs.test.result }} + run: | + if [ "$CHANGED" != "false" ] && [ "$TEST_RESULT" != "success" ]; then + exit 1 + fi From 253024b301c49df9cd56d5eef8e284375ead81b7 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 20 Sep 2026 15:12:12 -0300 Subject: [PATCH 02/12] feat: add reusable node-test workflow --- .github/workflows/node-test.yml | 105 ++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 .github/workflows/node-test.yml diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml new file mode 100644 index 0000000..20f7c7a --- /dev/null +++ b/.github/workflows/node-test.yml @@ -0,0 +1,105 @@ +# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors +# SPDX-License-Identifier: MIT + +name: Node tests + +on: + workflow_call: + +permissions: + contents: read + +concurrency: + group: node-tests-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + changes: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + outputs: + src: ${{ steps.changes.outputs.src }} + steps: + - name: Detect Node test changes + id: changes + uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 + continue-on-error: true + with: + filters: | + src: + - '.github/workflows/**' + - '__tests__/**' + - '__mocks__/**' + - 'src/**' + - 'appinfo/info.xml' + - 'package.json' + - 'package-lock.json' + - 'tsconfig.json' + - '**.js' + - '**.ts' + - '**.vue' + + test: + runs-on: ubuntu-latest + needs: changes + if: needs.changes.outputs.src != 'false' + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Read package.json engines + id: versions + uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 + with: + fallbackNode: '^24' + fallbackNpm: '^11.3' + + - name: Set up node ${{ steps.versions.outputs.nodeVersion }} + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: ${{ steps.versions.outputs.nodeVersion }} + + - name: Set up npm ${{ steps.versions.outputs.npmVersion }} + run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' + + - name: Install dependencies and build + env: + CYPRESS_INSTALL_BINARY: 0 + run: | + npm ci + npm run build --if-present + + - name: Test + run: npm run test --if-present + + - name: Test and process coverage + run: npm run test:coverage --if-present + + - name: Collect coverage + uses: codecov/codecov-action@0b35c9ecc4f0529d0eb674914510c22f85b196b4 # v7.1.0 + with: + files: ./coverage/lcov.info + + summary: + permissions: + contents: none + runs-on: ubuntu-latest + needs: + - changes + - test + if: always() + name: test-summary + steps: + - name: Summary status + env: + CHANGED: ${{ needs.changes.outputs.src }} + TEST_RESULT: ${{ needs.test.result }} + run: | + if [ "$CHANGED" != "false" ] && [ "$TEST_RESULT" != "success" ]; then + exit 1 + fi From a7d025f2c1145e1a184c84a1bb92bf9492989516 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 20 Sep 2026 15:12:24 -0300 Subject: [PATCH 03/12] chore: vendor Nextcloud lint-typescript workflow --- upstream/vendor/nextcloud/lint-typescript.yml | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 upstream/vendor/nextcloud/lint-typescript.yml diff --git a/upstream/vendor/nextcloud/lint-typescript.yml b/upstream/vendor/nextcloud/lint-typescript.yml new file mode 100644 index 0000000..0b865e6 --- /dev/null +++ b/upstream/vendor/nextcloud/lint-typescript.yml @@ -0,0 +1,100 @@ +# 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-License-Identifier: MIT + +name: Type checking + +on: + pull_request: + push: + branches: + - main + - master + - stable* + +permissions: + contents: read + +concurrency: + group: lint-typescript-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + changes: + runs-on: ubuntu-latest-low + permissions: + contents: read + pull-requests: read + + outputs: + src: ${{ steps.changes.outputs.src}} + + steps: + - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 + id: changes + continue-on-error: true + with: + filters: | + src: + - '.github/workflows/lint-typescript.yml' + - 'package.json' + - 'package-lock.json' + - 'tsconfig.json' + - '**.ts' + - '**.vue' + + test: + runs-on: ubuntu-latest + + needs: changes + if: needs.changes.outputs.src != 'false' + + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Read package.json node and npm engines version + uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 + id: versions + with: + fallbackNode: '^24' + fallbackNpm: '^11.3' + + - name: Set up node ${{ steps.versions.outputs.nodeVersion }} + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: ${{ steps.versions.outputs.nodeVersion }} + + - name: Set up npm ${{ steps.versions.outputs.npmVersion }} + run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' + + - name: Install dependencies + env: + CYPRESS_INSTALL_BINARY: 0 + run: | + npm ci + + - name: Check types + run: | + npm run --if-present check-types + npm run --if-present ts:check + + summary: + permissions: + contents: none + runs-on: ubuntu-latest-low + needs: [changes, test] + + if: always() + + name: typescript-summary + + steps: + - name: Summary status + run: if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi From 38b366fa5b787061a0e251819806c3b9998ca228 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 20 Sep 2026 15:12:28 -0300 Subject: [PATCH 04/12] chore: define LibreCode lint-typescript workflow patch --- patches/nextcloud/lint-typescript.yml.patch | 195 ++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 patches/nextcloud/lint-typescript.yml.patch diff --git a/patches/nextcloud/lint-typescript.yml.patch b/patches/nextcloud/lint-typescript.yml.patch new file mode 100644 index 0000000..b21bf6d --- /dev/null +++ b/patches/nextcloud/lint-typescript.yml.patch @@ -0,0 +1,195 @@ +--- upstream/vendor/nextcloud/lint-typescript.yml ++++ .github/workflows/lint-typescript.yml +@@ -1,100 +1,92 @@ +-# 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-License-Identifier: MIT +- +-name: Type checking +- +-on: +- pull_request: +- push: +- branches: +- - main +- - master +- - stable* +- +-permissions: +- contents: read +- +-concurrency: +- group: lint-typescript-${{ github.head_ref || github.run_id }} +- cancel-in-progress: true +- +-jobs: +- changes: +- runs-on: ubuntu-latest-low +- permissions: +- contents: read +- pull-requests: read +- +- outputs: +- src: ${{ steps.changes.outputs.src}} +- +- steps: +- - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 +- id: changes +- continue-on-error: true +- with: +- filters: | +- src: +- - '.github/workflows/lint-typescript.yml' +- - 'package.json' +- - 'package-lock.json' +- - 'tsconfig.json' +- - '**.ts' +- - '**.vue' +- +- test: +- runs-on: ubuntu-latest +- +- needs: changes +- if: needs.changes.outputs.src != 'false' +- +- steps: +- - name: Checkout +- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 +- with: +- persist-credentials: false +- +- - name: Read package.json node and npm engines version +- uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 +- id: versions +- with: +- fallbackNode: '^24' +- fallbackNpm: '^11.3' +- +- - name: Set up node ${{ steps.versions.outputs.nodeVersion }} +- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 +- with: +- node-version: ${{ steps.versions.outputs.nodeVersion }} +- +- - name: Set up npm ${{ steps.versions.outputs.npmVersion }} +- run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' +- +- - name: Install dependencies +- env: +- CYPRESS_INSTALL_BINARY: 0 +- run: | +- npm ci +- +- - name: Check types +- run: | +- npm run --if-present check-types +- npm run --if-present ts:check +- +- summary: +- permissions: +- contents: none +- runs-on: ubuntu-latest-low +- needs: [changes, test] +- +- if: always() +- +- name: typescript-summary +- +- steps: +- - name: Summary status +- run: if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi ++# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors ++# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors ++# SPDX-License-Identifier: MIT ++ ++name: Type checking ++ ++on: ++ workflow_call: ++ ++permissions: ++ contents: read ++ ++concurrency: ++ group: lint-typescript-${{ github.head_ref || github.run_id }} ++ cancel-in-progress: true ++ ++jobs: ++ changes: ++ runs-on: ubuntu-latest ++ permissions: ++ contents: read ++ pull-requests: read ++ outputs: ++ src: ${{ steps.changes.outputs.src }} ++ steps: ++ - name: Detect TypeScript changes ++ id: changes ++ uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 ++ continue-on-error: true ++ with: ++ filters: | ++ src: ++ - '.github/workflows/**' ++ - 'package.json' ++ - 'package-lock.json' ++ - 'tsconfig.json' ++ - '**.ts' ++ - '**.vue' ++ ++ test: ++ runs-on: ubuntu-latest ++ needs: changes ++ if: needs.changes.outputs.src != 'false' ++ steps: ++ - name: Checkout ++ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 ++ with: ++ persist-credentials: false ++ ++ - name: Read package.json engines ++ id: versions ++ uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 ++ with: ++ fallbackNode: '^24' ++ fallbackNpm: '^11.3' ++ ++ - name: Set up node ${{ steps.versions.outputs.nodeVersion }} ++ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 ++ with: ++ node-version: ${{ steps.versions.outputs.nodeVersion }} ++ ++ - name: Set up npm ${{ steps.versions.outputs.npmVersion }} ++ run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' ++ ++ - name: Install dependencies ++ env: ++ CYPRESS_INSTALL_BINARY: 0 ++ run: npm ci ++ ++ - name: Check types ++ run: | ++ npm run --if-present check-types ++ npm run --if-present ts:check ++ ++ summary: ++ permissions: ++ contents: none ++ runs-on: ubuntu-latest ++ needs: ++ - changes ++ - test ++ if: always() ++ name: typescript-summary ++ steps: ++ - name: Summary status ++ env: ++ CHANGED: ${{ needs.changes.outputs.src }} ++ TEST_RESULT: ${{ needs.test.result }} ++ run: | ++ if [ "$CHANGED" != "false" ] && [ "$TEST_RESULT" != "success" ]; then ++ exit 1 ++ fi From 5318d0012bcce999bea7309d4cd6f8a225bf0603 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 20 Sep 2026 15:12:33 -0300 Subject: [PATCH 05/12] chore: vendor Nextcloud node-test workflow --- upstream/vendor/nextcloud/node-test.yml | 112 ++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 upstream/vendor/nextcloud/node-test.yml diff --git a/upstream/vendor/nextcloud/node-test.yml b/upstream/vendor/nextcloud/node-test.yml new file mode 100644 index 0000000..1b74d3e --- /dev/null +++ b/upstream/vendor/nextcloud/node-test.yml @@ -0,0 +1,112 @@ +# 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-License-Identifier: MIT + +name: Node tests + +on: + pull_request: + push: + branches: + - main + - master + - stable* + +permissions: + contents: read + +concurrency: + group: node-tests-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + changes: + runs-on: ubuntu-latest-low + permissions: + contents: read + pull-requests: read + + outputs: + src: ${{ steps.changes.outputs.src}} + + steps: + - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 + id: changes + continue-on-error: true + with: + filters: | + src: + - '.github/workflows/**' + - '__tests__/**' + - '__mocks__/**' + - 'src/**' + - 'appinfo/info.xml' + - 'package.json' + - 'package-lock.json' + - 'tsconfig.json' + - '**.js' + - '**.ts' + - '**.vue' + + test: + runs-on: ubuntu-latest + + needs: changes + if: needs.changes.outputs.src != 'false' + + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Read package.json node and npm engines version + uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 + id: versions + with: + fallbackNode: '^24' + fallbackNpm: '^11.3' + + - name: Set up node ${{ steps.versions.outputs.nodeVersion }} + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: ${{ steps.versions.outputs.nodeVersion }} + + - name: Set up npm ${{ steps.versions.outputs.npmVersion }} + run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' + + - name: Install dependencies & build + env: + CYPRESS_INSTALL_BINARY: 0 + run: | + npm ci + npm run build --if-present + + - name: Test + run: npm run test --if-present + + - name: Test and process coverage + run: npm run test:coverage --if-present + + - name: Collect coverage + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 + with: + files: ./coverage/lcov.info + + summary: + permissions: + contents: none + runs-on: ubuntu-latest-low + needs: [changes, test] + + if: always() + + name: test-summary + + steps: + - name: Summary status + run: if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi From ab9dd64dfe66186a69d6ae5459cf7964f14e87d7 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 20 Sep 2026 15:12:35 -0300 Subject: [PATCH 06/12] chore: define LibreCode node-test workflow patch --- patches/nextcloud/node-test.yml.patch | 220 ++++++++++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 patches/nextcloud/node-test.yml.patch diff --git a/patches/nextcloud/node-test.yml.patch b/patches/nextcloud/node-test.yml.patch new file mode 100644 index 0000000..ea62352 --- /dev/null +++ b/patches/nextcloud/node-test.yml.patch @@ -0,0 +1,220 @@ +--- upstream/vendor/nextcloud/node-test.yml ++++ .github/workflows/node-test.yml +@@ -1,112 +1,105 @@ +-# 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-License-Identifier: MIT +- +-name: Node tests +- +-on: +- pull_request: +- push: +- branches: +- - main +- - master +- - stable* +- +-permissions: +- contents: read +- +-concurrency: +- group: node-tests-${{ github.head_ref || github.run_id }} +- cancel-in-progress: true +- +-jobs: +- changes: +- runs-on: ubuntu-latest-low +- permissions: +- contents: read +- pull-requests: read +- +- outputs: +- src: ${{ steps.changes.outputs.src}} +- +- steps: +- - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 +- id: changes +- continue-on-error: true +- with: +- filters: | +- src: +- - '.github/workflows/**' +- - '__tests__/**' +- - '__mocks__/**' +- - 'src/**' +- - 'appinfo/info.xml' +- - 'package.json' +- - 'package-lock.json' +- - 'tsconfig.json' +- - '**.js' +- - '**.ts' +- - '**.vue' +- +- test: +- runs-on: ubuntu-latest +- +- needs: changes +- if: needs.changes.outputs.src != 'false' +- +- steps: +- - name: Checkout +- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 +- with: +- persist-credentials: false +- +- - name: Read package.json node and npm engines version +- uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 +- id: versions +- with: +- fallbackNode: '^24' +- fallbackNpm: '^11.3' +- +- - name: Set up node ${{ steps.versions.outputs.nodeVersion }} +- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 +- with: +- node-version: ${{ steps.versions.outputs.nodeVersion }} +- +- - name: Set up npm ${{ steps.versions.outputs.npmVersion }} +- run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' +- +- - name: Install dependencies & build +- env: +- CYPRESS_INSTALL_BINARY: 0 +- run: | +- npm ci +- npm run build --if-present +- +- - name: Test +- run: npm run test --if-present +- +- - name: Test and process coverage +- run: npm run test:coverage --if-present +- +- - name: Collect coverage +- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 +- with: +- files: ./coverage/lcov.info +- +- summary: +- permissions: +- contents: none +- runs-on: ubuntu-latest-low +- needs: [changes, test] +- +- if: always() +- +- name: test-summary +- +- steps: +- - name: Summary status +- run: if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi ++# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors ++# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors ++# SPDX-License-Identifier: MIT ++ ++name: Node tests ++ ++on: ++ workflow_call: ++ ++permissions: ++ contents: read ++ ++concurrency: ++ group: node-tests-${{ github.head_ref || github.run_id }} ++ cancel-in-progress: true ++ ++jobs: ++ changes: ++ runs-on: ubuntu-latest ++ permissions: ++ contents: read ++ pull-requests: read ++ outputs: ++ src: ${{ steps.changes.outputs.src }} ++ steps: ++ - name: Detect Node test changes ++ id: changes ++ uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 ++ continue-on-error: true ++ with: ++ filters: | ++ src: ++ - '.github/workflows/**' ++ - '__tests__/**' ++ - '__mocks__/**' ++ - 'src/**' ++ - 'appinfo/info.xml' ++ - 'package.json' ++ - 'package-lock.json' ++ - 'tsconfig.json' ++ - '**.js' ++ - '**.ts' ++ - '**.vue' ++ ++ test: ++ runs-on: ubuntu-latest ++ needs: changes ++ if: needs.changes.outputs.src != 'false' ++ steps: ++ - name: Checkout ++ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 ++ with: ++ persist-credentials: false ++ ++ - name: Read package.json engines ++ id: versions ++ uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 ++ with: ++ fallbackNode: '^24' ++ fallbackNpm: '^11.3' ++ ++ - name: Set up node ${{ steps.versions.outputs.nodeVersion }} ++ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 ++ with: ++ node-version: ${{ steps.versions.outputs.nodeVersion }} ++ ++ - name: Set up npm ${{ steps.versions.outputs.npmVersion }} ++ run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' ++ ++ - name: Install dependencies and build ++ env: ++ CYPRESS_INSTALL_BINARY: 0 ++ run: | ++ npm ci ++ npm run build --if-present ++ ++ - name: Test ++ run: npm run test --if-present ++ ++ - name: Test and process coverage ++ run: npm run test:coverage --if-present ++ ++ - name: Collect coverage ++ uses: codecov/codecov-action@0b35c9ecc4f0529d0eb674914510c22f85b196b4 # v7.1.0 ++ with: ++ files: ./coverage/lcov.info ++ ++ summary: ++ permissions: ++ contents: none ++ runs-on: ubuntu-latest ++ needs: ++ - changes ++ - test ++ if: always() ++ name: test-summary ++ steps: ++ - name: Summary status ++ env: ++ CHANGED: ${{ needs.changes.outputs.src }} ++ TEST_RESULT: ${{ needs.test.result }} ++ run: | ++ if [ "$CHANGED" != "false" ] && [ "$TEST_RESULT" != "success" ]; then ++ exit 1 ++ fi From 5e47034a5b173fe16ca18a627d5d532cafe32af9 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 20 Sep 2026 15:12:51 -0300 Subject: [PATCH 07/12] feat: track TypeScript and Node test upstream sources --- upstream/sources.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/upstream/sources.json b/upstream/sources.json index 8c393ce..81fb92a 100644 --- a/upstream/sources.json +++ b/upstream/sources.json @@ -63,6 +63,24 @@ "sha256": "e66e5c0b4ff2cf6741a1891849ea3de8662c77c6d198131e0cf54ab2a82cccf7", "destination": "upstream/vendor/nextcloud/lint-stylelint.yml" }, + { + "name": "nextcloud-lint-typescript", + "repository": "nextcloud/.github", + "ref": "master", + "path": "workflow-templates/lint-typescript.yml", + "url": "https://raw.githubusercontent.com/nextcloud/.github/cf6248d5ef28a328cde764daf80bc5fae4705ade/workflow-templates/lint-typescript.yml", + "sha256": "2b243e05ff8ac82561a46aab1d485e4a83cf13c939f74b6f978d43ab197ab951", + "destination": "upstream/vendor/nextcloud/lint-typescript.yml" + }, + { + "name": "nextcloud-node-test", + "repository": "nextcloud/.github", + "ref": "master", + "path": "workflow-templates/node-test.yml", + "url": "https://raw.githubusercontent.com/nextcloud/.github/cf6248d5ef28a328cde764daf80bc5fae4705ade/workflow-templates/node-test.yml", + "sha256": "e6245c256fb6e124678b6d802d2f5133f47ab6d0280b71db1d613d1921343605", + "destination": "upstream/vendor/nextcloud/node-test.yml" + }, { "name": "nextcloud-npm-build", "repository": "nextcloud/.github", From 1d9736350d6d0a91cb88c451c4490a9c76c52c29 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 20 Sep 2026 15:12:54 -0300 Subject: [PATCH 08/12] feat: render TypeScript and Node test workflows --- upstream/templates.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/upstream/templates.json b/upstream/templates.json index 2deccf4..19beed2 100644 --- a/upstream/templates.json +++ b/upstream/templates.json @@ -56,6 +56,22 @@ ], "destination": ".github/workflows/lint-stylelint.yml" }, + { + "name": "nextcloud-lint-typescript", + "source": "upstream/vendor/nextcloud/lint-typescript.yml", + "patches": [ + "patches/nextcloud/lint-typescript.yml.patch" + ], + "destination": ".github/workflows/lint-typescript.yml" + }, + { + "name": "nextcloud-node-test", + "source": "upstream/vendor/nextcloud/node-test.yml", + "patches": [ + "patches/nextcloud/node-test.yml.patch" + ], + "destination": ".github/workflows/node-test.yml" + }, { "name": "nextcloud-npm-build", "source": "upstream/vendor/nextcloud/npm-build.yml", From c3be87dba60fbfacdf168a2efaa5d02b17970c37 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 20 Sep 2026 15:13:52 -0300 Subject: [PATCH 09/12] security: avoid ad-hoc npm installation in lint-typescript --- .github/workflows/lint-typescript.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-typescript.yml b/.github/workflows/lint-typescript.yml index 4ab837a..a4e46d1 100644 --- a/.github/workflows/lint-typescript.yml +++ b/.github/workflows/lint-typescript.yml @@ -59,8 +59,8 @@ jobs: with: node-version: ${{ steps.versions.outputs.nodeVersion }} - - name: Set up npm ${{ steps.versions.outputs.npmVersion }} - run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' + - name: Show npm version + run: npm --version - name: Install dependencies env: From 06f7be3a1818e15e33f43f0f611e8e7b296edeb3 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 20 Sep 2026 15:13:57 -0300 Subject: [PATCH 10/12] security: avoid ad-hoc npm installation in node-test --- .github/workflows/node-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml index 20f7c7a..d9406d4 100644 --- a/.github/workflows/node-test.yml +++ b/.github/workflows/node-test.yml @@ -64,8 +64,8 @@ jobs: with: node-version: ${{ steps.versions.outputs.nodeVersion }} - - name: Set up npm ${{ steps.versions.outputs.npmVersion }} - run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' + - name: Show npm version + run: npm --version - name: Install dependencies and build env: From df03a4670583237e9370d523b32a18cebbc73729 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 20 Sep 2026 15:14:14 -0300 Subject: [PATCH 11/12] fix: update lint-typescript downstream patch --- patches/nextcloud/lint-typescript.yml.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/nextcloud/lint-typescript.yml.patch b/patches/nextcloud/lint-typescript.yml.patch index b21bf6d..8266c22 100644 --- a/patches/nextcloud/lint-typescript.yml.patch +++ b/patches/nextcloud/lint-typescript.yml.patch @@ -162,8 +162,8 @@ + with: + node-version: ${{ steps.versions.outputs.nodeVersion }} + -+ - name: Set up npm ${{ steps.versions.outputs.npmVersion }} -+ run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' ++ - name: Show npm version ++ run: npm --version + + - name: Install dependencies + env: From 9294e5ed72a0e275dc686235e3973dcd76c189d1 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 20 Sep 2026 15:14:26 -0300 Subject: [PATCH 12/12] fix: update node-test downstream patch --- patches/nextcloud/node-test.yml.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/nextcloud/node-test.yml.patch b/patches/nextcloud/node-test.yml.patch index ea62352..2757cd6 100644 --- a/patches/nextcloud/node-test.yml.patch +++ b/patches/nextcloud/node-test.yml.patch @@ -179,8 +179,8 @@ + with: + node-version: ${{ steps.versions.outputs.nodeVersion }} + -+ - name: Set up npm ${{ steps.versions.outputs.npmVersion }} -+ run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' ++ - name: Show npm version ++ run: npm --version + + - name: Install dependencies and build + env: