Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nextcloud/app_api
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 49af885ac8b098a1c33be06b28dd3a7561b16bac
Choose a base ref
..
head repository: nextcloud/app_api
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 74cb1edca577a92ebad1de22b70a0b6feb42e6ee
Choose a head ref
Showing with 1,375 additions and 392 deletions.
  1. +25 −0 .github/workflows/docs-check.yml
  2. +153 −0 .github/workflows/lint.yml
  3. +55 −0 .github/workflows/node-build.yml
  4. +105 −0 .github/workflows/node.yml
  5. +391 −392 .github/workflows/tests-deploy.yml
  6. +137 −0 .github/workflows/tests-special.yml
  7. +509 −0 .github/workflows/tests.yml
25 changes: 25 additions & 0 deletions .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Docs check
on:
pull_request:

permissions:
contents: read

jobs:
build_docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Docs dependencies
run: python3 -m pip install -r docs/requirements.txt

- name: Build and push Docs
run: |
make html SPHINXOPTS="-W"
153 changes: 153 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Lint

on:
pull_request:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: lint-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
xml-lint:
runs-on: ubuntu-22.04
name: info.xml lint

steps:
- uses: actions/checkout@v4

- name: Download xml appinfo schema
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd

- name: Lint appinfo/info.xml
uses: ChristophWurst/xmllint-action@v1.1
with:
xml-file: ./appinfo/info.xml
xml-schema-file: ./info.xsd

php-lint:
runs-on: ubuntu-22.04
name: php-lint
strategy:
matrix:
php-versions: ["8.1"]

steps:
- uses: actions/checkout@v4

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none

- name: Lint
run: composer run lint

php-cs:
runs-on: ubuntu-22.04
name: php-cs
strategy:
matrix:
php-versions: ["8.1"]

steps:
- uses: actions/checkout@v4

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none

- name: Install dependencies
run: composer i

- name: Lint
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )

php-psalm-analysis:
runs-on: ubuntu-22.04
strategy:
matrix:
php-versions: ["8.1"]
name: php-psalm-analysis

steps:
- uses: actions/checkout@v4
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none

- name: Install dependencies
run: composer i

- name: Run coding standards check
run: composer run psalm

php-security-analysis:
runs-on: ubuntu-22.04
permissions:
contents: read
actions: read
security-events: write
name: security analysis
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Psalm
uses: docker://vimeo/psalm-github-actions:4.30.0
with:
security_analysis: true
composer_ignore_platform_reqs: false
report_file: results.sarif

- name: Upload Security Analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif

js-eslint:
runs-on: ubuntu-22.04
name: eslint

steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci

- name: ESLint
run: npm run lint

stylelint:
runs-on: ubuntu-22.04

name: stylelint

steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci

- name: Lint
run: npm run stylelint

lint-success:
permissions:
contents: none
runs-on: ubuntu-22.04
needs: [xml-lint, php-lint, php-cs, php-psalm-analysis, php-security-analysis, js-eslint, stylelint]
name: Lint-OK
steps:
- run: echo "Lint passed successfully"
55 changes: 55 additions & 0 deletions .github/workflows/node-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Node Build

on:
pull_request:
paths:
- src/**
- .eslintrc.js
- stylelint.config.js
- webpack.js
push:
branches:
- main
paths:
- src/**
- .eslintrc.js
- stylelint.config.js
- webpack.js

jobs:
build:
name: node-build
runs-on: ubuntu-latest

steps:
- name: Set app env
run: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV

- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #
with:
path: ${{ env.APP_NAME }}

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
id: versions
with:
path: ${{ env.APP_NAME }}
fallbackNode: "^20"
fallbackNpm: "^9"

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
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: Build ${{ env.APP_NAME }}
run: |
cd ${{ env.APP_NAME }}
npm ci
npm run build
105 changes: 105 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +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: 2021-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Node

on: pull_request

permissions:
contents: read

concurrency:
group: node-${{ 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:
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- 'src/**'
- 'appinfo/info.xml'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- '**.js'
- '**.ts'
- '**.vue'
build:
runs-on: ubuntu-latest

needs: changes
if: needs.changes.outputs.src != 'false'

name: NPM build
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
id: versions
with:
fallbackNode: '^20'
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
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
PUPPETEER_SKIP_DOWNLOAD: true
run: |
npm ci
npm run build --if-present
- name: Check webpack build changes
run: |
bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)"
- name: Show changes on failure
if: failure()
run: |
git status
git --no-pager diff
exit 1 # make it red to grab attention
summary:
permissions:
contents: none
runs-on: ubuntu-latest-low
needs: [changes, build]

if: always()

# This is the summary, we just avoid to rename it so that branch protection rules still match
name: node

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.build.result != 'success' }}; then exit 1; fi
Loading