-
Notifications
You must be signed in to change notification settings - Fork 17
62 lines (51 loc) · 1.78 KB
/
regression_diff_test.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
57
58
59
60
61
name: Regression Diff Test
on: [push]
jobs:
regression_diff_test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.10.x
- name: Install dependencies
run: |
python -V
pip install -r requirements.txt
- name: Install ifex module and prepare
run: |
python setup.py develop
mkdir difftest
# We have to copy the script because
# 1. It might not even exist in the compared version
# 2. If it exists, we want to run the same version on both
cp .github/workflows/regression_diff_test.sh ./script_to_run.sh
- name: Run generation steps on new code
run: |
./script_to_run.sh >difftest/new
- name: Debug - dump context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Run generation steps on compared (old) code
run: |
#git fetch ${{ github.event.before }}
git checkout -q ${{ github.event.before }} && git rev-parse HEAD >difftest/previous && ./script_to_run.sh >>difftest/previous || true
#git fetch origin/master
git checkout -q origin/master && git rev-parse HEAD >difftest/origin_master && ./script_to_run.sh >difftest/origin_master || true
- name: Diff against HEAD~1
run: |
cd difftest
diff previous new || true
- name: Diff against origin/master
run: |
cd difftest
diff origin_master new || true
- name: Upload files
uses: actions/upload-artifact@v3
with:
name: difftest
path: difftest