Skip to content
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
40 changes: 36 additions & 4 deletions .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
# 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

name: PHPUnit

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*

permissions:
contents: read

env:
# Location of the phpunit.xml and phpunit.integration.xml files
PHPUNIT_CONFIG: ./tests/phpunit.xml
Expand All @@ -19,17 +40,18 @@ jobs:
strategy:
matrix:
php-versions: ["7.4", "8.0"]
server-versions: ["master", "stable24", "stable23", "stable22"]
server-versions: ["master", "stable25", "stable24", "stable23"]
include:
- php-versions: "7.3"
server-versions: "stable22"
- php-versions: "7.3"
server-versions: "stable23"
- php-versions: "8.1"
server-versions: "stable24"
- php-versions: "8.1"
server-versions: "stable25"
- php-versions: "8.1"
server-versions: "master"


steps:
- name: Set app env
run: |
Expand All @@ -56,7 +78,15 @@ jobs:
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite
coverage: none

- name: Check composer file existence
id: check_composer
uses: andstor/file-existence-action@v1
with:
files: apps/${{ env.APP_NAME }}/composer.json

- name: Set up PHPUnit
# Only run if phpunit config file exists
if: steps.check_composer.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: composer i

Expand All @@ -66,7 +96,7 @@ jobs:
run: |
mkdir data
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
./occ app:enable ${{ env.APP_NAME }}
./occ app:enable --force ${{ env.APP_NAME }}

- name: Check PHPUnit config file existence
id: check_phpunit
Expand Down Expand Up @@ -98,6 +128,8 @@ jobs:
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}

summary:
permissions:
contents: none
runs-on: ubuntu-latest
needs: phpunit-sqlite

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
ocp-version: [ 'dev-master', 'dev-stable24', 'dev-stable23', 'dev-stable22' ]
ocp-version: [ 'dev-master', 'dev-stable25', 'dev-stable24', 'dev-stable23' ]
name: Nextcloud ${{ matrix.ocp-version }}
steps:
- name: Checkout
Expand Down