-
Notifications
You must be signed in to change notification settings - Fork 12
56 lines (48 loc) · 1.67 KB
/
regression_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# .github/workflows/regression_tests.yml
name: Regression Tests
on:
pull_request:
branches:
- main
jobs:
regression_tests:
name: regression_tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
lfs: true
fetch-depth: 0 # This ensures we can checkout main branch too
- uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: 'x64'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run benchmarks and compare to baseline
if: github.event.pull_request.base.ref == 'main'
run: |
# Check if regression test results exist in main branch
if [ -f 'git cat-file -e main:tests/regression_test_baselines.json' ]; then
git checkout main tests/regression_test_baselines.json
else
echo "No regression test results found in main branch"
fi
PYTHONHASHSEED=0 pytest tests/test_regression.py
git checkout
# - name: Comment PR
# if: github.event.pull_request.base.ref == 'main'
# uses: actions/github-script@v7
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# script: |
# const fs = require('fs');
# const TestReport = fs.readFileSync('regression_test_report.txt', 'utf8');
# await github.rest.issues.createComment({
# issue_number: context.issue.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: `## Regression Test Results\n\`\`\`\n${TestReport}\n\`\`\``
# });