Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
283 commits
Select commit Hold shift + click to select a range
85b4383
feat: add numerical statistics routes
vitormattos Sep 8, 2026
ff38000
test: cover numerical statistics aggregation
vitormattos Sep 8, 2026
c11fb35
docs: document aggregate statistics API
vitormattos Sep 8, 2026
a8eb2e4
refactor: align metric validation limits
vitormattos Sep 8, 2026
cfa97db
feat: add application metric schema storage
vitormattos Sep 8, 2026
7e10d15
feat: add application schema repository
vitormattos Sep 8, 2026
4d622a5
fix: preserve application schema creation time
vitormattos Sep 8, 2026
fe00ded
feat: add versioned metric schema validation
vitormattos Sep 8, 2026
95f7859
feat: validate reports against registered schemas
vitormattos Sep 8, 2026
598ad35
feat: add application schema administration API
vitormattos Sep 8, 2026
eea554a
feat: add application schema routes
vitormattos Sep 8, 2026
be136cf
test: cover application schema validation
vitormattos Sep 8, 2026
ead1deb
docs: document application metric schemas
vitormattos Sep 8, 2026
178964b
fix: make application schema versions immutable
vitormattos Sep 8, 2026
b3c0ab5
fix: make schema registration idempotent
vitormattos Sep 8, 2026
feb5bec
test: cover immutable application schemas
vitormattos Sep 8, 2026
95bb88f
feat: add historical data retention job
vitormattos Sep 8, 2026
052e867
feat: register historical retention job
vitormattos Sep 8, 2026
6a661a0
docs: clarify immutable application schemas
vitormattos Sep 8, 2026
d636dad
docs: document registered schema behavior
vitormattos Sep 8, 2026
7a6aeac
refactor: extract historical data cleanup service
vitormattos Sep 8, 2026
9a3aecc
refactor: keep retention background job thin
vitormattos Sep 8, 2026
b123506
test: cover historical data retention
vitormattos Sep 8, 2026
9380cd6
feat: add retention settings service
vitormattos Sep 8, 2026
6afe719
feat: add retention settings API
vitormattos Sep 8, 2026
5b55d11
refactor: use validated retention settings in cleanup job
vitormattos Sep 8, 2026
b8faa0f
feat: add server settings routes
vitormattos Sep 8, 2026
72e368b
ci: test against MySQL
vitormattos Sep 8, 2026
f4950b4
ci: test against PostgreSQL
vitormattos Sep 8, 2026
c63f660
docs: document historical data retention
vitormattos Sep 8, 2026
474a002
fix: normalize database datetime parameters
vitormattos Sep 8, 2026
273e1b2
fix: normalize statistic datetime filters
vitormattos Sep 8, 2026
24535c1
fix: normalize retention datetime filters
vitormattos Sep 8, 2026
c7b59ce
fix: build aggregations with DBAL functions
vitormattos Sep 8, 2026
ca4b967
test: use DBAL functions in retention assertions
vitormattos Sep 8, 2026
1575585
fix: normalize schema timestamps
vitormattos Sep 8, 2026
7a30552
fix: let DBAL build count star expressions
vitormattos Sep 8, 2026
9f6c91e
test: let DBAL build count star expression
vitormattos Sep 8, 2026
d51f877
fix: make distribution ordering deterministic
vitormattos Sep 8, 2026
ea5ea57
fix: avoid setValues in report transaction
vitormattos Sep 8, 2026
29854a5
refactor: normalize report metric storage
vitormattos Sep 8, 2026
31b7531
feat: reject conflicting report periods
vitormattos Sep 8, 2026
8a7e0a8
refactor: store normalized report values
vitormattos Sep 8, 2026
515d8d7
refactor: aggregate typed metric values
vitormattos Sep 8, 2026
55071b7
refactor: simplify report response contract
vitormattos Sep 8, 2026
15be89e
test: cover normalized report storage
vitormattos Sep 8, 2026
a9c58ab
test: use normalized report repository contract
vitormattos Sep 8, 2026
2bd5889
docs: clarify report idempotency contract
vitormattos Sep 8, 2026
ff4fc0d
docs: describe normalized internal storage
vitormattos Sep 8, 2026
a6c6123
test: cover every metric storage type
vitormattos Sep 8, 2026
00a98bd
fix: normalize boolean result values
vitormattos Sep 8, 2026
bfe1d23
fix: strictly validate report payload shape
vitormattos Sep 8, 2026
248dcbe
test: cover strict protocol validation
vitormattos Sep 8, 2026
9e1555e
fix: strictly validate application schemas
vitormattos Sep 8, 2026
771ea5e
test: cover strict schema fields
vitormattos Sep 8, 2026
38a2617
refactor: register report route with ApiRoute
vitormattos Sep 8, 2026
b222d4a
refactor: register schema routes with ApiRoute
vitormattos Sep 8, 2026
4090cc0
refactor: register settings routes with ApiRoute
vitormattos Sep 8, 2026
b204d2e
refactor: register statistics routes with ApiRoute
vitormattos Sep 8, 2026
9d20d80
chore: add OpenAPI and Psalm tooling
vitormattos Sep 8, 2026
d9aebf8
refactor: remove legacy route registration
vitormattos Sep 8, 2026
3567cfb
chore: add OpenAPI extractor tooling
vitormattos Sep 8, 2026
8b08397
chore: add Psalm tooling
vitormattos Sep 8, 2026
1c1739e
chore: configure Psalm for OpenAPI
vitormattos Sep 8, 2026
88c1379
chore: add TypeScript OpenAPI tooling
vitormattos Sep 8, 2026
911dfd0
chore: configure TypeScript checks
vitormattos Sep 8, 2026
31fab3e
chore: configure JavaScript linting
vitormattos Sep 8, 2026
6992ef7
chore: configure OpenAPI TypeScript outputs
vitormattos Sep 8, 2026
636c3e7
ci: add OpenAPI contract validation
vitormattos Sep 8, 2026
ef50f42
ci: add ESLint workflow
vitormattos Sep 8, 2026
b9996d4
ci: add TypeScript workflow
vitormattos Sep 8, 2026
ba8e4c9
ci: add Node workflow
vitormattos Sep 8, 2026
6227078
ci: add Psalm workflow
vitormattos Sep 8, 2026
f098fad
fix: align OpenAPI TypeScript peer dependency
vitormattos Sep 8, 2026
01c8c84
chore: initialize TypeScript sources
vitormattos Sep 8, 2026
2678d51
fix: avoid generating npm lock in CI
vitormattos Sep 8, 2026
b2e33d6
fix: avoid generating npm lock in eslint CI
vitormattos Sep 8, 2026
07a156d
fix: avoid generating npm lock in TypeScript CI
vitormattos Sep 8, 2026
8ffc884
fix: avoid generating npm lock in Node CI
vitormattos Sep 8, 2026
dbb6f35
ci: upload generated OpenAPI artifacts
vitormattos Sep 8, 2026
0535089
fix: align Psalm platform version
vitormattos Sep 8, 2026
bf3ab2f
fix: satisfy Psalm override checks
vitormattos Sep 8, 2026
a5a6693
fix: align Psalm DBAL handling with Talk
vitormattos Sep 8, 2026
68b13e5
fix: mark migration override explicitly
vitormattos Sep 8, 2026
90988f0
fix: narrow numerical rows before merging
vitormattos Sep 8, 2026
81b990b
ci: align Psalm workflow with Talk
vitormattos Sep 8, 2026
1e55e2b
fix: document report API responses
vitormattos Sep 8, 2026
72138b7
fix: document schema API responses
vitormattos Sep 8, 2026
af0c912
fix: document settings API responses
vitormattos Sep 8, 2026
a6feed0
fix: disambiguate statistics API routes
vitormattos Sep 8, 2026
70785ba
docs: update statistics API routes
vitormattos Sep 8, 2026
01a8f7b
ci: validate OpenAPI generation without tracked baseline
vitormattos Sep 8, 2026
01f918f
test: add Behat integration dependencies
vitormattos Sep 8, 2026
9f2278c
test: configure Behat integration suite
vitormattos Sep 8, 2026
bf61264
test: add Behat Nextcloud context
vitormattos Sep 8, 2026
cedd3e1
test: support anonymous Behat requests
vitormattos Sep 8, 2026
ff43ae0
test: cover usage statistics OCS API with Behat
vitormattos Sep 8, 2026
d8f3ce4
ci: run Behat integration tests
vitormattos Sep 8, 2026
115f923
fix: require RFC3339 statistic ranges
vitormattos Sep 8, 2026
45b9201
test: cover strict historical range validation
vitormattos Sep 8, 2026
8a45446
fix: preserve newest installation report
vitormattos Sep 8, 2026
8b88c40
test: keep current state on delayed reports
vitormattos Sep 8, 2026
930e443
ci: skip app dev scripts in Behat setup
vitormattos Sep 8, 2026
87b9333
feat: enforce metric schema compatibility
vitormattos Sep 8, 2026
1064bbd
feat: enforce metric aggregation contracts
vitormattos Sep 8, 2026
550f5ef
test: cover metric aggregation contracts
vitormattos Sep 8, 2026
17cade5
fix: use portable schema iteration
vitormattos Sep 8, 2026
840d381
test: isolate vendor deprecations in Behat
vitormattos Sep 8, 2026
e1e1f55
fix: track current report period atomically
vitormattos Sep 8, 2026
6ae3d70
fix: update installation state atomically
vitormattos Sep 8, 2026
4c08659
test: keep user deprecations visible in Behat
vitormattos Sep 8, 2026
1fc5ed3
test: verify materialized report period
vitormattos Sep 8, 2026
9626dad
ci: test MariaDB compatibility
vitormattos Sep 8, 2026
20c4a12
ci: stabilize Behat integration matrix
vitormattos Sep 8, 2026
a9cf461
ci: align MariaDB test workflow
vitormattos Sep 8, 2026
f11251e
test: cover current report tie breaking
vitormattos Sep 8, 2026
2f7ad4e
test: pin Behat integration dependencies
vitormattos Sep 8, 2026
b208c39
docs: define current report ordering
vitormattos Sep 8, 2026
cb7b5a7
test: keep tie periods within protocol limit
vitormattos Sep 8, 2026
faa90cb
ci: retain Behat dependency snapshot
vitormattos Sep 8, 2026
9e55ee8
ci: persist generated Behat lock once
vitormattos Sep 8, 2026
ebea0f2
test: lock Behat integration dependencies
github-actions[bot] Sep 8, 2026
94a518f
ci: restore read-only Behat workflow
vitormattos Sep 8, 2026
167b278
test: add Infection mutation testing
vitormattos Sep 8, 2026
e4f52ef
test: configure Infection baseline
vitormattos Sep 8, 2026
1f4bfe2
test: add mutation testing command
vitormattos Sep 8, 2026
69a9d1a
ci: add mutation testing workflow
vitormattos Sep 8, 2026
e5ab233
ci: derive Behat support boundaries
vitormattos Sep 8, 2026
ffcbe96
fix: use forwarded Infection binary
vitormattos Sep 8, 2026
6b31f2f
ci: align PHP version matrix action
vitormattos Sep 8, 2026
97585a8
ci: preserve Infection dependency lock
vitormattos Sep 8, 2026
6f13f98
test: avoid remote PHPUnit schema dependency
vitormattos Sep 8, 2026
6ba7370
ci: use explicit maximum PHP boundary
vitormattos Sep 8, 2026
6847688
ci: reuse validated coverage for Infection
vitormattos Sep 8, 2026
29b5905
ci: use PCOV for mutation coverage
vitormattos Sep 8, 2026
e06f28b
fix: run Infection from isolated vendor bin
vitormattos Sep 8, 2026
4d40459
test: diagnose Infection coverage parser
vitormattos Sep 8, 2026
4f7ddc3
test: reproduce Infection autoload stack
vitormattos Sep 8, 2026
5a31cb8
test: include Nextcloud bootstrap in parser diagnosis
vitormattos Sep 8, 2026
85563e2
test: add isolated Infection bootstrap
vitormattos Sep 8, 2026
6ab398b
test: use isolated Infection bootstrap
vitormattos Sep 8, 2026
6607dbf
ci: finalize Infection workflow
vitormattos Sep 8, 2026
27dcc29
ci: scope PCOV to app sources
vitormattos Sep 8, 2026
55420fd
test: harden report contract boundaries
vitormattos Sep 8, 2026
e04faaa
test: harden schema validation contracts
vitormattos Sep 8, 2026
25bd2af
test: cover schema compatibility across versions
vitormattos Sep 8, 2026
815f40f
test: strengthen statistics aggregation contracts
vitormattos Sep 8, 2026
e185aa6
refactor: centralize metric identity
vitormattos Sep 8, 2026
e14468d
refactor: use metric identity helper
vitormattos Sep 8, 2026
a71a758
refactor: use metric identity helper in schemas
vitormattos Sep 8, 2026
6a9254e
refactor: use collision-safe metric identities
vitormattos Sep 8, 2026
558fd36
test: cover collision-safe metric identities
vitormattos Sep 8, 2026
50cd84c
ci: show all escaped mutations
vitormattos Sep 8, 2026
749b5f8
refactor: simplify schema validation state
vitormattos Sep 8, 2026
3df0bc4
refactor: simplify duplicate metric tracking
vitormattos Sep 8, 2026
0a98df2
refactor: simplify RFC3339 validation
vitormattos Sep 8, 2026
19d28da
refactor: simplify schema metric lookup
vitormattos Sep 8, 2026
1c1e0cd
refactor: simplify statistics aggregation
vitormattos Sep 8, 2026
8596643
test: cover metric identity separator placement
vitormattos Sep 8, 2026
b0f0e1d
test: strengthen report parsing boundaries
vitormattos Sep 8, 2026
f43ad3d
refactor: require normalized registered schemas
vitormattos Sep 8, 2026
c3ae3ad
test: strengthen schema repository contracts
vitormattos Sep 8, 2026
73463ec
test: strengthen statistics ordering and type coverage
vitormattos Sep 8, 2026
b899fe5
refactor: remove redundant retention cursor close
vitormattos Sep 8, 2026
3c5d1d7
test: cover multi-batch retention cleanup
vitormattos Sep 8, 2026
2b153fe
refactor: separate report container guards
vitormattos Sep 8, 2026
7f9057c
refactor: separate schema container guards
vitormattos Sep 8, 2026
9a23cf5
test: strengthen schema validation boundaries
vitormattos Sep 8, 2026
144e93b
refactor: simplify installation existence checks
vitormattos Sep 8, 2026
3419762
refactor: use registered metric type for numerical statistics
vitormattos Sep 8, 2026
27e736d
refactor: propagate registered metric type to statistics queries
vitormattos Sep 8, 2026
77b9a86
test: cover registered numerical metric types
vitormattos Sep 8, 2026
60b45a3
refactor: remove redundant report object guards
vitormattos Sep 8, 2026
ce158b8
refactor: remove redundant schema metric object guard
vitormattos Sep 8, 2026
0a79139
test: isolate invalid calendar date validation
vitormattos Sep 8, 2026
652c791
test: pass registered numerical metric type
vitormattos Sep 8, 2026
796c1f0
test: enforce mutation testing baseline
vitormattos Sep 8, 2026
d7c2b86
ci: add PHPStan analysis
vitormattos Sep 8, 2026
d703678
ci: add PHPStan analysis
vitormattos Sep 8, 2026
06a7763
ci: add PHPStan analysis
vitormattos Sep 8, 2026
7cd777e
ci: add PHPStan analysis
vitormattos Sep 8, 2026
19a6243
ci: add REUSE compliance
vitormattos Sep 8, 2026
0cf5a1f
ci: add REUSE compliance
vitormattos Sep 8, 2026
099500a
ci: automate nextcloud OCP updates
vitormattos Sep 8, 2026
ec59057
ci: add Dependabot configuration
vitormattos Sep 8, 2026
0261558
ci: add REUSE license texts
vitormattos Sep 8, 2026
0511ec3
ci: add REUSE license texts
vitormattos Sep 8, 2026
071b8a8
ci: add REUSE license texts
vitormattos Sep 8, 2026
d918dd3
ci: complete REUSE metadata
vitormattos Sep 8, 2026
bf1b6e9
ci: complete REUSE metadata
vitormattos Sep 8, 2026
47073d9
ci: complete REUSE metadata
vitormattos Sep 8, 2026
3dd191a
ci: complete REUSE metadata
vitormattos Sep 8, 2026
a96189c
fix: address PHPStan findings
vitormattos Sep 8, 2026
d228055
fix: address PHPStan findings
vitormattos Sep 8, 2026
95e1551
fix: address PHPStan findings
vitormattos Sep 8, 2026
48d5ab9
fix: address PHPStan findings
vitormattos Sep 8, 2026
e82393d
fix: address PHPStan findings
vitormattos Sep 8, 2026
0cd537b
fix: address PHPStan findings
vitormattos Sep 8, 2026
4eb2ab0
fix: preserve list validation in PHPStan types
vitormattos Sep 8, 2026
f81e54e
fix: preserve list validation in PHPStan types
vitormattos Sep 8, 2026
e1a58ae
chore: update project authorship metadata
vitormattos Sep 8, 2026
d07e3d8
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
e4c55fc
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
5f07451
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
9446ac1
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
6cd0617
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
f1bbb5a
chore: use LibreCode SPDX copyright
vitormattos Sep 8, 2026
6a62304
chore: use LibreCode SPDX copyright
vitormattos Sep 8, 2026
7932d72
chore: use LibreCode SPDX copyright
vitormattos Sep 8, 2026
ec37cda
chore: preserve Nextcloud SPDX copyright
vitormattos Sep 8, 2026
dd5d6d9
chore: preserve Nextcloud SPDX copyright
vitormattos Sep 8, 2026
35532ca
chore: preserve Nextcloud SPDX copyright
vitormattos Sep 8, 2026
87b4fad
chore: use LibreCode SPDX copyright
vitormattos Sep 8, 2026
a68928a
chore: use LibreCode SPDX copyright
vitormattos Sep 8, 2026
e852696
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
dcfae32
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
9b4d340
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
2dce261
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
9a0c1a6
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
964e5e8
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
15b08c4
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
d4386c7
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
b25ce42
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
ab689ef
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
d6e7fda
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
b111612
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
ca62547
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
c16d8b2
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
3bd0cac
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
780f84a
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
2817bb6
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
c5bb134
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
4550dfb
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
907ef43
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
9f411c3
chore: add LibreCode SPDX headers
vitormattos Sep 8, 2026
291d482
chore: use LibreCode SPDX copyright
vitormattos Sep 8, 2026
82bdd7c
chore: use LibreCode SPDX copyright
vitormattos Sep 8, 2026
eda6c01
chore: use LibreCode SPDX copyright
vitormattos Sep 8, 2026
da7d2ff
chore: use LibreCode SPDX copyright
vitormattos Sep 8, 2026
99e67e4
chore: use LibreCode SPDX copyright
vitormattos Sep 8, 2026
f6368d6
chore: add LibreCode SPDX header
vitormattos Sep 8, 2026
d413ecf
chore: add LibreCode SPDX header
vitormattos Sep 8, 2026
b541a31
chore: add LibreCode SPDX header
vitormattos Sep 8, 2026
758f4e7
chore: add LibreCode SPDX header
vitormattos Sep 8, 2026
2d55887
chore: add LibreCode SPDX header
vitormattos Sep 8, 2026
a2acdfa
chore: add LibreCode SPDX header
vitormattos Sep 8, 2026
30f6122
refactor: narrow database exception handling
vitormattos Sep 8, 2026
798c868
refactor: avoid broad throwable catches
vitormattos Sep 8, 2026
28fadb9
chore: remove redundant REUSE annotations
vitormattos Sep 8, 2026
9682048
chore: trim REUSE annotations
vitormattos Sep 8, 2026
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
3 changes: 0 additions & 3 deletions .env

This file was deleted.

24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

version: 2
updates:
- package-ecosystem: composer
directories:
- /
- /vendor-bin/infection
- /vendor-bin/openapi-extractor
- /vendor-bin/phpstan
- /vendor-bin/psalm
schedule:
interval: daily

- package-ecosystem: npm
directory: /
schedule:
interval: daily

- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
158 changes: 158 additions & 0 deletions .github/workflows/behat-sqlite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

name: Behat SQLite

on:
pull_request:

permissions:
contents: read

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

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
php-min: ${{ steps.versions.outputs.php-min }}
php-max: ${{ steps.versions.outputs.php-max }}
branches-min: ${{ steps.versions.outputs.branches-min }}
branches-max: ${{ steps.versions.outputs.branches-max }}

steps:
- name: Checkout app
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Get version matrix
id: versions
uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3

changes:
runs-on: ubuntu-latest
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/behat*'
- 'appinfo/**'
- 'lib/**'
- 'tests/integration/**'
- 'composer.json'
- 'composer.lock'

behat-sqlite:
runs-on: ubuntu-latest
needs: [changes, matrix]
if: needs.changes.outputs.src != 'false'
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
include:
- php-version: ${{ needs.matrix.outputs.php-min }}
server-version: ${{ needs.matrix.outputs.branches-min }}
boundary: minimum
- php-version: ${{ needs.matrix.outputs.php-max }}
server-version: ${{ needs.matrix.outputs.branches-max }}
boundary: maximum

env:
APP_NAME: usage_statistics_server

name: SQLite ${{ matrix.boundary }} PHP ${{ matrix.php-version }} Nextcloud ${{ matrix.server-version }}

steps:
- name: Checkout server
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-version }}

- name: Checkout app
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
path: apps/${{ env.APP_NAME }}

- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: ${{ matrix.php-version }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, sockets, sqlite, pdo_sqlite, xmlreader, xmlwriter, zip, zlib
coverage: none
ini-file: development
ini-values: disable_functions=
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
working-directory: apps/${{ env.APP_NAME }}
run: |
composer remove nextcloud/ocp --dev --no-scripts
composer install --no-dev --no-scripts
composer --working-dir=tests/integration install --prefer-dist --no-progress

- name: Set up Nextcloud
run: |
mkdir data
./occ maintenance:install \
--verbose \
--database=sqlite \
--database-name=nextcloud \
--admin-user admin \
--admin-pass admin
./occ --version
./occ app:enable --force ${{ env.APP_NAME }}
./occ config:system:set auth.bruteforce.protection.enabled --value false --type boolean
./occ config:system:set ratelimit.protection.enabled --value false --type boolean
./occ config:system:set debug --value true --type boolean

- name: Run Behat
working-directory: apps/${{ env.APP_NAME }}/tests/integration
env:
BEHAT_ROOT_DIR: ../../../../
BEHAT_RUN_AS: runner
BEHAT_VERBOSE: ${{ runner.debug }}
run: composer run behat

- name: Upload Behat results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: behat-results-${{ matrix.boundary }}-nc${{ matrix.server-version }}-php${{ matrix.php-version }}
path: apps/${{ env.APP_NAME }}/tests/integration/output/
if-no-files-found: ignore
retention-days: 30

- name: Print logs
if: always()
run: cat data/nextcloud.log 2>/dev/null || true

summary:
permissions:
contents: none
runs-on: ubuntu-latest
needs: [changes, behat-sqlite]
if: always()
name: behat-sqlite-summary

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.behat-sqlite.result != 'success' }}; then exit 1; fi
23 changes: 0 additions & 23 deletions .github/workflows/ci.yml

This file was deleted.

158 changes: 158 additions & 0 deletions .github/workflows/infection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

name: Infection

on:
pull_request:

permissions:
contents: read

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

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
php-min: ${{ steps.versions.outputs.php-min }}
branches-max: ${{ steps.versions.outputs.branches-max }}

steps:
- name: Checkout app
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Get version matrix
id: versions
uses: nextcloud-libraries/nextcloud-version-matrix@cd0211ffcef1065e2020cd579e4843b8746e7a58 # v1.3.3

changes:
runs-on: ubuntu-latest
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/infection.yml'
- 'appinfo/**'
- 'lib/**'
- 'tests/php/**'
- 'vendor-bin/infection/**'
- 'infection.json5'
- 'composer.json'
- 'composer.lock'

infection:
runs-on: ubuntu-latest
needs: [changes, matrix]
if: needs.changes.outputs.src != 'false'
timeout-minutes: 30
env:
APP_NAME: usage_statistics_server

name: PHP ${{ needs.matrix.outputs.php-min }} Nextcloud ${{ needs.matrix.outputs.branches-max }}

steps:
- name: Checkout server
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
repository: nextcloud/server
ref: ${{ needs.matrix.outputs.branches-max }}

- name: Checkout app
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
path: apps/${{ env.APP_NAME }}

- name: Set up PHP ${{ needs.matrix.outputs.php-min }}
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
with:
php-version: ${{ needs.matrix.outputs.php-min }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, sockets, sqlite, pdo_sqlite, xmlreader, xmlwriter, zip, zlib
coverage: pcov
ini-file: development
ini-values: disable_functions=, memory_limit=2G, pcov.directory=${{ github.workspace }}/apps/${{ env.APP_NAME }}/lib
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
working-directory: apps/${{ env.APP_NAME }}
run: |
composer remove nextcloud/ocp --dev --no-scripts
composer install

- name: Set up Nextcloud
run: |
mkdir data
./occ maintenance:install \
--verbose \
--database=sqlite \
--database-name=nextcloud \
--admin-user admin \
--admin-pass admin
./occ app:enable --force ${{ env.APP_NAME }}

- name: Generate mutation coverage
working-directory: apps/${{ env.APP_NAME }}
run: |
mkdir -p build/coverage/coverage-xml
vendor/bin/phpunit -c tests/php/phpunit.xml \
--coverage-xml build/coverage/coverage-xml \
--log-junit build/coverage/junit.xml \
--colors=always \
--fail-on-warning \
--fail-on-risky

- name: Run Infection
working-directory: apps/${{ env.APP_NAME }}
env:
COMPOSER_PROCESS_TIMEOUT: 0
run: |
set -o pipefail
composer mutation:test -- \
--coverage=build/coverage \
--skip-initial-tests \
--threads=max \
--show-mutations=max \
--no-progress \
--no-interaction 2>&1 | tee infection.log

- name: Upload Infection results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: infection-results
path: |
apps/${{ env.APP_NAME }}/infection.log
apps/${{ env.APP_NAME }}/build/coverage/junit.xml
apps/${{ env.APP_NAME }}/build/coverage/coverage-xml/index.xml
apps/${{ env.APP_NAME }}/vendor-bin/infection/composer.lock
if-no-files-found: ignore
retention-days: 14

summary:
permissions:
contents: none
runs-on: ubuntu-latest
needs: [changes, infection]
if: always()
name: infection-summary

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