Skip to content

feat!: replace charts in admin settings with ocs stats api #793

feat!: replace charts in admin settings with ocs stats api

feat!: replace charts in admin settings with ocs stats api #793

Workflow file for this run

# SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Profile
on: pull_request
jobs:
matrix:
runs-on: ubuntu-latest-low
outputs:
php-version: ${{ steps.versions.outputs.php-available-list }}
server-max: ${{ steps.versions.outputs.branches-max-list }}
steps:
- name: Checkout app
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Get version matrix
id: versions
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
profile:
runs-on: ubuntu-latest
needs: [matrix]
strategy:
matrix:
flag: ['', '--v6']
php-version: ${{ fromJson(needs.matrix.outputs.php-version) }}
nextcloud-version: ${{ fromJson(needs.matrix.outputs.server-max) }}
name: php${{ matrix.php-version }} ${{ matrix.flag }} profiling
services:
mysql-service:
image: mariadb:10.11
env:
MYSQL_ROOT_PASSWORD: my-secret-pw
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_PASSWORD: nextcloud
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- name: Set up php${{ matrix.php-version }}
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-version }}
extensions: ctype,curl,dom,gd,iconv,intl,json,mbstring,openssl,pdo_mysql,posix,sqlite,xml,zip
coverage: none
- name: Checkout Nextcloud
run: git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.nextcloud-version }} nextcloud
- name: Install Nextcloud
run: php -f nextcloud/occ maintenance:install --database-host 127.0.0.1 --database-name nextcloud --database-user nextcloud --database-pass nextcloud --admin-user admin --admin-pass admin --database mysql
- name: Checkout app
uses: actions/checkout@master
with:
path: nextcloud/apps/suspicious_login
- name: Install dependencies
working-directory: nextcloud/apps/suspicious_login
run: composer install
- name: Enable app
run: php -f nextcloud/occ app:enable suspicious_login
- name: Seed the database
run: |
php -f nextcloud/occ config:system:set debug --type bool --value true
php -f nextcloud/occ suspiciouslogin:seed ${{ matrix.flag }}
php -f nextcloud/occ config:system:set debug --type bool --value false
- name: Profile a training
run: time php -f nextcloud/occ suspiciouslogin:train -v ${{ matrix.flag }}
summary:
permissions:
contents: none
runs-on: ubuntu-latest
needs: [ profile ]
if: always()
name: profile-summary
steps:
- name: Summary status
run: if ${{ needs.profile.result != 'false' && needs.profile.result != 'success' }}; then exit 1; fi