| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, | |
| # software distributed under the License is distributed on an | |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| # KIND, either express or implied. See the License for the | |
| # specific language governing permissions and limitations | |
| # under the License. | |
| # To learn more about GitHub Actions in Apache Beam check the CI.md | |
| name: Performance alerting tool on Python load/performance/benchmark tests. | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '5 22 * * *' | |
| pull_request: | |
| branches: ['master'] | |
| tags: 'v*' | |
| paths: ['sdks/python/apache_beam/testing/**'] | |
| jobs: | |
| python_run_change_point_analysis: | |
| name: Run Change Point Analysis. | |
| runs-on: [self-hosted, ubuntu-24.04, main] | |
| permissions: | |
| issues: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - name: Install python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: '3.11' | |
| - name: Install Apache Beam | |
| working-directory: ./sdks/python | |
| run: pip install -e .[gcp,test] | |
| - name: Install signal-processing-algorithms | |
| run: pip install signal-processing-algorithms | |
| - name: Install pandas, yaml, requests | |
| run: pip install pandas db-dtypes PyYAML requests | |
| - name: Run Change Point Analysis. | |
| working-directory: ./sdks/python/apache_beam/testing/analyzers | |
| shell: bash | |
| run: python perf_analysis.py --config_file_path=./tests_config.yaml --save_alert_metadata | |
| if: github.event_name != 'pull_request' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run Change Point Analysis. | |
| working-directory: ./sdks/python/apache_beam/testing/analyzers | |
| shell: bash | |
| run: python perf_analysis.py --config_file_path=./tests_config.yaml | |
| if: github.event_name == 'pull_request' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run change point analysis tests. | |
| working-directory: ./sdks/python/apache_beam/testing/analyzers | |
| shell: bash | |
| run: pytest perf_analysis_test.py | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |