Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update workflows from templates #278

Merged
merged 2 commits into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/lint-info-xml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@

name: Lint info.xml

on:
pull_request:
push:
branches:
- main
- master
- stable*
on: pull_request

permissions:
contents: read
Expand All @@ -27,13 +21,13 @@ jobs:
name: info.xml lint
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

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

- name: Lint info.xml
uses: ChristophWurst/xmllint-action@39155a91429af431d65fafc21fa52ba5c4f5cb71 # v1.1
uses: ChristophWurst/xmllint-action@36f2a302f84f8c83fceea0b9c59e1eb4a616d3c1 # v1.2
with:
xml-file: ./appinfo/info.xml
xml-schema-file: ./info.xsd
8 changes: 4 additions & 4 deletions .github/workflows/lint-php-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up php
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
- name: Set up php8.2
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
with:
php-version: 8.1
php-version: 8.2
coverage: none
ini-file: development
env:
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@

name: Lint php

on:
pull_request:
push:
branches:
- main
- master
- stable*
on: pull_request

permissions:
contents: read
Expand All @@ -25,16 +19,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ "8.0", "8.1", "8.2" ]
php-versions: [ '8.0', '8.1', '8.2', '8.3' ]

name: php-lint

steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
Expand Down
57 changes: 33 additions & 24 deletions .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,7 @@

name: PHPUnit sqlite

on:
pull_request:
paths:
- '.github/workflows/**'
- 'appinfo/**'
- 'lib/**'
- 'templates/**'
- 'tests/**'
- 'vendor/**'
- 'vendor-bin/**'
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'

push:
branches:
- main
- master
- stable*
on: pull_request

permissions:
contents: read
Expand All @@ -33,9 +15,36 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest

outputs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- 'appinfo/**'
- 'lib/**'
- 'templates/**'
- 'tests/**'
- 'vendor/**'
- 'vendor-bin/**'
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'

phpunit-sqlite:
runs-on: ubuntu-latest

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

strategy:
matrix:
php-versions: ['8.0', '8.1', '8.2', '8.3']
Expand All @@ -48,19 +57,19 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV

- name: Checkout server
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}

- name: Checkout app
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: apps/${{ env.APP_NAME }}

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
Expand Down Expand Up @@ -137,12 +146,12 @@ jobs:
permissions:
contents: none
runs-on: ubuntu-latest
needs: phpunit-sqlite
needs: [changes, phpunit-sqlite]

if: always()

name: phpunit-sqlite-summary

steps:
- name: Summary status
run: if ${{ needs.phpunit-sqlite.result != 'success' }}; then exit 1; fi
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-sqlite.result != 'success' }}; then exit 1; fi
2 changes: 1 addition & 1 deletion .github/workflows/pr-feedback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ jobs:
Thank you for contributing to Nextcloud and we hope to hear from you soon!
days-before-feedback: 14
start-date: "2023-07-10"
exempt-authors: "${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot"
exempt-authors: "${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot,skjnldsv,datenangebot"
exempt-bots: true
18 changes: 6 additions & 12 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@

name: Static analysis

on:
pull_request:
push:
branches:
- master
- main
- stable*
on: pull_request

concurrency:
group: psalm-${{ github.head_ref || github.run_id }}
Expand All @@ -21,15 +15,15 @@ jobs:
static-analysis:
runs-on: ubuntu-latest

name: Nextcloud
name: static-psalm-analysis
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up php
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
- name: Set up php8.2
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
with:
php-version: 8.1
php-version: 8.2
coverage: none
ini-file: development
env:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/update-nextcloud-ocp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ jobs:
strategy:
fail-fast: false
matrix:
branches: ["main", "master", "stable27", "stable26", "stable25"]
branches: ['main', 'master', 'stable28', 'stable27', 'stable26']

name: update-nextcloud-ocp-${{ matrix.branches }}

steps:
- id: checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ matrix.branches }}
submodules: true
continue-on-error: true

- name: Set up php8.1
- name: Set up php8.2
if: steps.checkout.outcome == 'success'
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
with:
php-version: 8.1
php-version: 8.2
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
coverage: none
Expand Down
Loading