diff --git a/.github/actions-lock.txt b/.github/actions-lock.txt index 0e75857af3c..358f657ca90 100644 --- a/.github/actions-lock.txt +++ b/.github/actions-lock.txt @@ -11,7 +11,7 @@ d1898b1290d50f874d8092ebda6ee5e1 dependabot-approve-merge.yml 0aa2ea77ebe63ea6f9a8a068eeda6b56 lint-php.yml ecc3837168cd56bcfed602d48d1ec62e lint-stylelint.yml c8770d61f6f9339176e7c123fa528111 lint-typescript.yml -3e3175e4952a376d60689110aa0c2771 node-test.yml +8c5eaa94d9b27a234e93cc0a931a3e0e node-test.yml 9f8a0f7b4d6e6212fc62263ba92d6c88 node.yml 364d3748f485e4396e8bd5c10436ffab openapi.yml e903ac1234923756dabd0fa2e8deab99 phpunit-mariadb.yml @@ -23,5 +23,5 @@ da384ce3c502c4db682fe9def63cbac0 phpunit-mysql.yml d7cf735c67e59ca0c943dae96b436d64 psalm.yml 1ed6482c19f2825139a077870ef7a38c reuse.yml 800d5b188aa885626cf4169fa2dfea9e update-nextcloud-ocp-approve-merge.yml -28a598fdceba85422dd05d48b6a27022 update-nextcloud-ocp.yml +43ad17165ffe7b396b69afb4cfd799be update-nextcloud-ocp.yml 48c2c657b87747c9faeb589bcce08923 update-stable-titles.yml diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml index 00943023a4b..fef3e0ae688 100644 --- a/.github/workflows/node-test.yml +++ b/.github/workflows/node-test.yml @@ -91,7 +91,7 @@ jobs: run: npm run test --if-present - name: Collect coverage - uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 + uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 with: files: ./coverage/lcov.info diff --git a/.github/workflows/node-test.yml.orig b/.github/workflows/node-test.yml.orig new file mode 100644 index 00000000000..6490c073950 --- /dev/null +++ b/.github/workflows/node-test.yml.orig @@ -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@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.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@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.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@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 + 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 diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml index 15ae4e2e3a8..124e3070ee4 100644 --- a/.github/workflows/update-nextcloud-ocp.yml +++ b/.github/workflows/update-nextcloud-ocp.yml @@ -111,7 +111,7 @@ jobs: - name: Create Pull Request if: steps.checkout.outcome == 'success' - uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9 + uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0 with: token: ${{ secrets.COMMAND_BOT_PAT }} commit-message: 'chore(dev-deps): Bump nextcloud/ocp package'