Collection of minor improvements #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will compare the current branch with the main branch and evaluate for performance differences. | |
name: Performance Regression Test | |
on: | |
pull_request: | |
branches: master | |
jobs: | |
build-python-and-test-performance: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r all-requirements.txt | |
- name: Checkout PR and Master Branch | |
uses: actions/checkout@v2 | |
with: | |
path: pr | |
- uses: actions/checkout@v2 | |
with: | |
ref: master | |
path: master | |
- name: Run Benchmark on Master (baseline) | |
run: cd master && pytest tests/integration_tests/test_speed.py --benchmark-only --benchmark-json=benchmark.json | |
- name: Run Benchmark on PR | |
run: cd pr && pytest tests/integration_tests/test_speed.py --benchmark-only --benchmark-json=benchmark.json | |
- name: Compare Results | |
uses: openpgpjs/github-action-pull-request-benchmark@v1 | |
with: | |
tool: "pytest" | |
pr-benchmark-file-path: pr/benchmark.json | |
base-benchmark-file-path: master/benchmark.json | |
alert-threshold: "130%" | |
# Workflow will fail if `fail-threshold` is exceeded | |
fail-on-alert: true | |
fail-threshold: "150%" |