Skip to content

Commit 89cb137

Browse files
fix fail status
1 parent 4bbcefb commit 89cb137

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/examples.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,17 @@ name: Test examples
22
permissions: read-all
33

44
on:
5+
pull_request: # TODO: remove
56
schedule:
67
- cron: '0 0 * * *'
78
workflow_dispatch:
89
inputs:
910
pull_request_number:
1011
description: 'The pull request number'
11-
required: true
12-
type: number
12+
default: ''
1313
pytest_args:
1414
description: 'Pytest arguments'
1515
default: ''
16-
type: string
1716

1817
jobs:
1918
examples-cpu:
@@ -32,7 +31,7 @@ jobs:
3231
lfs: true
3332
fetch-depth: 0 # Fetch full history to allow checking out any branch or PR
3433
- name: Fetch and Checkout the Pull Request Branch
35-
if: ${{ github.event_name == 'workflow_dispatch' }}
34+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.pull_request_number != '' }}
3635
run: |
3736
git fetch origin pull/${{ github.event.inputs.pull_request_number }}/head:pr-${{ github.event.inputs.pull_request_number }}
3837
git checkout pr-${{ github.event.inputs.pull_request_number }}
@@ -49,7 +48,6 @@ jobs:
4948
- name: Print installed modules
5049
run: pip list
5150
- name: Run examples test scope
52-
continue-on-error: true
5351
run: |
5452
python -m pytest -ras tests/cross_fw/examples \
5553
--junit-xml=pytest-results-${{ matrix.group }}.xml \
@@ -62,6 +60,7 @@ jobs:
6260
TQDM_DISABLE: 1
6361
- name: Upload artifact
6462
uses: actions/upload-artifact@v4
63+
if: ${{ !cancelled() }}
6564
with:
6665
name: pytest-results-${{ matrix.group }}
6766
path: pytest-results-${{ matrix.group }}.xml

0 commit comments

Comments
 (0)