Files
cacti/.github/workflows/csv-window-coverage.yml
Thomas VincentandTheWitness 182b21dc53 fix(csv): align export and graph sample windows (#7987)
* fix(csv): align export and graph sample windows

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* ci(csv): satisfy release policy checks

* test(csv): align legacy capacity contract

* test(csv): add standard license headers

* fix(rrd): infer step from trailing fetch row

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* ci(csv): trigger on resolution query coverage

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* test(rrd): mirror fetch helper arguments

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* test(rrd): isolate percentile globals

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* test(rrd): annotate intentional eval

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* test(rrd): restore integration config

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* test(rrd): enable strict types

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* test(rrd): restore font config

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* ci: align CSV coverage with supported PHP versions

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
2026-09-12 20:18:00 -04:00

91 lines
3.1 KiB
YAML

name: CSV Window Coverage
on:
push:
branches: [develop]
paths:
- '.github/workflows/csv-window-coverage.yml'
- 'lib/rrd.php'
- 'lib/graph_variables.php'
- 'graph_xport.php'
- 'tests/Unit/Core/Rrd/RrdFetchWindowTest.php'
- 'tests/Unit/Core/Rrd/BandwidthEffectiveStepTest.php'
- 'tests/Unit/Core/Rrd/CsvWindowResolutionContractTest.php'
- 'tests/Unit/Core/Rrd/PercentileResolutionBehaviorTest.php'
- 'tests/Unit/ConsolidatedFunctionalFixesTest.php'
- 'tests/Unit/Ui/Graph/PercentileContractTest.php'
- 'tests/Unit/RrdResolutionStepQueryTest.php'
- 'tests/integration/RrdtoolProcessIntegrationTest.php'
- 'tests/integration/GraphVariablesDivisorContractTest.php'
pull_request:
branches: [develop]
paths:
- '.github/workflows/csv-window-coverage.yml'
- 'lib/rrd.php'
- 'lib/graph_variables.php'
- 'graph_xport.php'
- 'tests/Unit/Core/Rrd/RrdFetchWindowTest.php'
- 'tests/Unit/Core/Rrd/BandwidthEffectiveStepTest.php'
- 'tests/Unit/Core/Rrd/CsvWindowResolutionContractTest.php'
- 'tests/Unit/Core/Rrd/PercentileResolutionBehaviorTest.php'
- 'tests/Unit/ConsolidatedFunctionalFixesTest.php'
- 'tests/Unit/Ui/Graph/PercentileContractTest.php'
- 'tests/Unit/RrdResolutionStepQueryTest.php'
- 'tests/integration/RrdtoolProcessIntegrationTest.php'
- 'tests/integration/GraphVariablesDivisorContractTest.php'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: csv-window-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
name: PHP ${{ matrix.php }} unit and RRDtool integration
runs-on: ubuntu-24.04
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
php: ['8.3', '8.4', '8.5']
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Setup PHP and Composer
uses: ./.github/actions/setup-php-composer
with:
php-version: ${{ matrix.php }}
coverage: xdebug
install-args: '--no-interaction --prefer-dist'
- name: Install RRDtool
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y --no-install-recommends rrdtool
- name: Run CSV window tests
env:
RRDTOOL_TEST_BINARY: /usr/bin/rrdtool
run: |
set -euo pipefail
include/vendor/bin/pest \
tests/Unit/Core/Rrd/RrdFetchWindowTest.php \
tests/Unit/Core/Rrd/BandwidthEffectiveStepTest.php \
tests/Unit/Core/Rrd/CsvWindowResolutionContractTest.php \
tests/Unit/Core/Rrd/PercentileResolutionBehaviorTest.php \
tests/Unit/Ui/Graph/PercentileContractTest.php \
tests/Unit/RrdResolutionStepQueryTest.php \
tests/integration/RrdtoolProcessIntegrationTest.php \
tests/integration/GraphVariablesDivisorContractTest.php \
--coverage \
--coverage-text