Skip to content

Commit 9492593

Browse files
syassamiveerbhan
authored andcommitted
ci: Test on Pull Request
1 parent 7b9cb4e commit 9492593

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/wheel.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
name: Release & Upload Wheel
1+
name: CI && Release & Upload Wheel
22

33
on:
44
workflow_dispatch:
55
push:
66
branches:
77
- main
8-
- shayan-create-wheel-release
8+
pull_request:
9+
branches:
10+
- main
911

1012
jobs:
1113
build_and_upload_wheel:
@@ -20,11 +22,12 @@ jobs:
2022
working-directory: /workspace
2123
run: |
2224
python3 -m pip install cmake --upgrade
23-
./build.sh --build_wheel --config Release --parallel --skip_tests --skip_submodule_sync
25+
./build.sh --build_wheel --config Release --parallel ${{ github.event_name == 'pull_request' && ' ' || '--skip_tests'}} --skip_submodule_sync
2426
wheel_path=$(find . -name '*.whl' | xargs readlink -f)
2527
echo "wheel_path=$wheel_path" >> $GITHUB_ENV
2628
- name: Count releases
2729
id: count_releases
30+
if: github.event_name != 'pull_request'
2831
env:
2932
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3033
run: |
@@ -34,6 +37,7 @@ jobs:
3437
--header "Authorization: Bearer $GITHUB_TOKEN" | jq length)
3538
echo "count=$count" >> $GITHUB_ENV
3639
- name: Create Release
40+
if: github.event_name != 'pull_request'
3741
uses: softprops/action-gh-release@v1
3842
env:
3943
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)