Skip to content

Commit 4c0fe28

Browse files
SiegeLordExSiegeLord
authored andcommitted
Fix the automatic testing scripts
1 parent 7911936 commit 4c0fe28

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Tests
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
pull_request:
5+
types: [opened, synchronize, reopened, edited]
36
jobs:
47
ubuntu_test:
58
name: Ubuntu tests
@@ -30,14 +33,15 @@ jobs:
3033
3134
if [ -n "${{ github.base_ref }}" ]; then
3235
CHANGED_OUTPUTS=$(echo "${{ github.event.pull_request.body }}" | sed -n 's/.*CHANGED_OUTPUTS=\([^ ]*\).*/\1/p')
33-
BASE_BRANCH="${{ github.base_ref }}"
34-
HEAD_BRANCH="${{ github.head_ref || github.ref_name }}"
36+
BASE_REF="${{ github.base_ref }}"
37+
HEAD_REF=$(git rev-parse HEAD)
38+
echo "CHANGED_OUTPUTS: $CHANGED_OUTPUTS"
3539
36-
git fetch origin $BASE_BRANCH
37-
git checkout $BASE_BRANCH
40+
git fetch origin $BASE_REF
41+
git checkout $BASE_REF
3842
./cargo_util.py --make_golden_outputs
39-
git checkout $HEAD_BRANCH
40-
./cargo_util.py --test_outputs --ignore_new_outputs --changed_outputs $CHANGED_OUTPUTS
43+
git checkout $HEAD_REF
44+
./cargo_util.py --test_outputs --ignore_new_outputs --changed_outputs=$CHANGED_OUTPUTS
4145
fi
4246
- name: Upload golden outputs
4347
if: ${{ always() }}

0 commit comments

Comments
 (0)