0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-02-22 16:09:14 +00:00
nextcloud_server/.github/workflows/performance.yml
dependabot[bot] 0a6c8b46fe build(deps): bump the github-actions group with 5 updates
Bumps the github-actions group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4.1.1` | `4.2.2` |
| [shivammathur/setup-php](https://github.com/shivammathur/setup-php) | `2.25.2` | `2.31.1` |
| [actions/setup-node](https://github.com/actions/setup-node) | `4.0.4` | `4.1.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.4.0` | `4.4.3` |
| [codecov/codecov-action](https://github.com/codecov/codecov-action) | `4.5.0` | `4.6.0` |


Updates `actions/checkout` from 4.1.1 to 4.2.2
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.1...11bd71901bbe5b1630ceea73d27597364c9af683)

Updates `shivammathur/setup-php` from 2.25.2 to 2.31.1
- [Release notes](https://github.com/shivammathur/setup-php/releases)
- [Commits](https://github.com/shivammathur/setup-php/compare/2.25.2...c541c155eee45413f5b09a52248675b1a2575231)

Updates `actions/setup-node` from 4.0.4 to 4.1.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](0a44ba7841...39370e3970)

Updates `actions/upload-artifact` from 4.4.0 to 4.4.3
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](50769540e7...b4b15b8c7c)

Updates `codecov/codecov-action` from 4.5.0 to 4.6.0
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v4.5.0...v4.6.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: shivammathur/setup-php
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-13 12:09:30 +01:00

120 lines
4.5 KiB
YAML

# SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Performance testing
on:
pull_request:
concurrency:
group: performance-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
performance-testing:
runs-on: ubuntu-latest
if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
strategy:
fail-fast: false
matrix:
php-versions: ['8.1']
name: performance-${{ matrix.php-versions }}
steps:
- name: Disabled on forks
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
run: |
echo 'Can not run performance tests on forks'
exit 1
- name: Checkout server before PR
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: true
ref: ${{ github.event.pull_request.base.ref }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Nextcloud
run: |
mkdir data
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
php -S localhost:8080 &
- name: Apply blueprint
uses: icewind1991/blueprint@v0.1.2
with:
blueprint: tests/blueprints/basic.toml
ref: ${{ github.event.pull_request.head.ref }}
- name: Run before measurements
uses: nextcloud/profiler@6801ee10fc80f10b444388fb6ca9b36ad8a2ea83
with:
run: |
curl -s -X PROPFIND -u test:test http://localhost:8080/remote.php/dav/files/test
curl -s -u test:test http://localhost:8080/remote.php/dav/files/test/test.txt
curl -s -X PROPFIND -u test:test http://localhost:8080/remote.php/dav/files/test/many_files
curl -s -u test:test -T README.md http://localhost:8080/remote.php/dav/files/test/new_file.txt
curl -s -u test:test -X DELETE http://localhost:8080/remote.php/dav/files/test/new_file.txt
output: before.json
profiler-branch: master
- name: Apply PR
run: |
git remote add pr '${{ github.event.pull_request.head.repo.clone_url }}'
git fetch pr '${{ github.event.pull_request.head.ref }}'
git checkout -b 'pr/${{ github.event.pull_request.head.ref }}'
git submodule update
./occ upgrade
- name: Run after measurements
id: compare
uses: nextcloud/profiler@6801ee10fc80f10b444388fb6ca9b36ad8a2ea83
with:
run: |
curl -s -X PROPFIND -u test:test http://localhost:8080/remote.php/dav/files/test
curl -s -u test:test http://localhost:8080/remote.php/dav/files/test/test.txt
curl -s -X PROPFIND -u test:test http://localhost:8080/remote.php/dav/files/test/many_files
curl -s -u test:test -T README.md http://localhost:8080/remote.php/dav/files/test/new_file.txt
curl -s -u test:test -X DELETE http://localhost:8080/remote.php/dav/files/test/new_file.txt
output: after.json
profiler-branch: master
compare-with: before.json
- name: Upload profiles
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: profiles
path: |
before.json
after.json
- uses: actions/github-script@v7
if: failure() && steps.compare.outcome == 'failure'
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
let comment = `Possible performance regression detected\n`;
comment += `<details><summary>Show Output</summary>
\`\`\`
${{ steps.compare.outputs.compare }}
\`\`\`
</details>`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
})