Skip to content

Commit d37d75c

Browse files
committed
Use same scripte from E/App
1 parent e256048 commit d37d75c

1 file changed

Lines changed: 51 additions & 15 deletions

File tree

.github/workflows/reassurePerfTests.yml

Lines changed: 51 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@ jobs:
1010
# Note: We run baseline and delta performance checks in the same runner to reduce hardware variance across machines
1111
perf-tests:
1212
if: ${{ github.actor != 'OSBotify' }}
13-
runs-on: macos-latest
13+
runs-on: ubuntu-24.04-v4
1414
steps:
1515
# v4
1616
- name: Checkout
1717
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
1818
with:
19-
ref: ${{ github.event.pull_request.base.ref }}
19+
fetch-depth: 0
2020

2121
# v4
2222
- name: Setup Node
2323
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e
2424
with:
2525
node-version-file: '.nvmrc'
2626

27-
- name: Reassure stability check
28-
run: |
29-
npm ci
30-
npx reassure check-stability --verbose
27+
# - name: Reassure stability check
28+
# run: |
29+
# npm ci
30+
# npx reassure check-stability --verbose
3131

3232
# - name: Install dependencies
3333
# run: npm ci
@@ -46,16 +46,52 @@ jobs:
4646
# - name: Run Reassure delta tests
4747
# run: npx reassure --branch --verbose
4848

49-
- name: Reassure tests
49+
# - name: Reassure tests
50+
# run: |
51+
# git log --oneline --graph --decorate --all -n 10
52+
# npm ci
53+
# npx reassure --baseline --verbose
54+
# git fetch origin ${{ github.event.pull_request.head.sha }} --no-tags --depth=1
55+
# git switch --force --detach ${{ github.event.pull_request.head.sha }}
56+
# git log --oneline --graph --decorate --all -n 10
57+
# npm ci
58+
# npx reassure --branch --verbose
59+
60+
- name: Set dummy git credentials
61+
run: |
62+
git config --global user.email "test@test.com"
63+
git config --global user.name "Test"
64+
65+
- name: Get common ancestor commit
66+
run: |
67+
git fetch origin main
68+
common_ancestor=$(git merge-base "${{ github.sha }}" origin/main)
69+
echo "COMMIT_HASH=$common_ancestor" >> "$GITHUB_ENV"
70+
71+
- name: Clean up deleted files
72+
run: |
73+
DELETED_FILES=$(git diff --name-only --diff-filter=D "$COMMIT_HASH" "${{ github.sha }}")
74+
for file in $DELETED_FILES; do
75+
if [ -n "$file" ]; then
76+
rm -f "$file"
77+
echo "Deleted file: $file"
78+
fi
79+
done
80+
81+
- name: Run performance testing script
82+
shell: bash
5083
run: |
51-
git log --oneline --graph --decorate --all -n 10
52-
npm ci
53-
npx reassure --baseline --verbose
54-
git fetch origin ${{ github.event.pull_request.head.sha }} --no-tags --depth=1
55-
git switch --force --detach ${{ github.event.pull_request.head.sha }}
56-
git log --oneline --graph --decorate --all -n 10
57-
npm ci
58-
npx reassure --branch --verbose
84+
set -e
85+
BASELINE_BRANCH=${BASELINE_BRANCH:="main"}
86+
git fetch origin "$BASELINE_BRANCH" --no-tags --depth=1
87+
git switch "$BASELINE_BRANCH"
88+
npm install --force || (rm -rf node_modules && npm install --force)
89+
NODE_OPTIONS=--experimental-vm-modules npx reassure --baseline
90+
git switch --force --detach -
91+
git merge --no-commit --allow-unrelated-histories "$BASELINE_BRANCH" -X ours
92+
git checkout --ours .
93+
npm install --force || (rm -rf node_modules && npm install --force)
94+
NODE_OPTIONS=--experimental-vm-modules npx reassure --branch
5995
6096
- name: Upload Reassure results
6197
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)