Skip to content

Commit ca33dff

Browse files
authored
Fix scheduled event fails CI (#201)
1 parent d1381c5 commit ca33dff

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/CI.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050
# set outputs for other jobs to access for if conditions
5151
runs-on: ubuntu-latest
5252
needs: license-and-lint
53+
# To prevent error when there's no base branch
54+
if: github.event_name != 'schedule'
5355
timeout-minutes: 10
5456
outputs:
5557
agent: ${{ steps.filter.outputs.agent }}
@@ -82,7 +84,7 @@ jobs:
8284
# prep step for plugin and unit test
8385
name: Prepare Plugin and UT Matrix
8486
needs: [ license-and-lint, changes ]
85-
if: ${{ needs.changes.outputs.agent == 'true' }}
87+
if: github.event_name == 'schedule' || ${{ needs.changes.outputs.agent == 'true' }}
8688
runs-on: ubuntu-latest
8789
steps:
8890
- uses: actions/checkout@v3
@@ -97,7 +99,7 @@ jobs:
9799
# build docker image for plugin tests, with matrix of Python versions
98100
name: Construct Agent Plugin Test Images
99101
needs: [ license-and-lint, changes, prep-plugin-and-unit-tests ]
100-
if: ${{ needs.changes.outputs.agent == 'true' }}
102+
if: github.event_name == 'schedule' || ${{ needs.changes.outputs.agent == 'true' }}
101103
runs-on: ubuntu-latest
102104
strategy:
103105
matrix: # may support pypy in the future
@@ -126,7 +128,7 @@ jobs:
126128
# this step is only run after passing building images + prep matrix + changes
127129
name: Execute Agent Plugin and Unit Tests
128130
needs: [ license-and-lint, changes, docker-plugin, prep-plugin-and-unit-tests ]
129-
if: ${{ needs.changes.outputs.agent == 'true' }}
131+
if: github.event_name == 'schedule' || ${{ needs.changes.outputs.agent == 'true' }}
130132
runs-on: ubuntu-latest
131133
timeout-minutes: 30
132134
strategy:
@@ -162,7 +164,7 @@ jobs:
162164
# build docker image for E2E tests, single Python version for now.
163165
name: Construct Agent E2E Test Images
164166
needs: [ license-and-lint, changes ]
165-
if: ${{ needs.changes.outputs.agent == 'true' }}
167+
if: github.event_name == 'schedule' || ${{ needs.changes.outputs.agent == 'true' }}
166168
runs-on: ubuntu-latest
167169
timeout-minutes: 10
168170
steps:
@@ -187,7 +189,7 @@ jobs:
187189
# execute E2E tests with SkyWalking-infra-e2e with a matrix of agent protocols
188190
name: Basic function + ${{ matrix.case.name }} Transport (Python3.7)
189191
needs: [ license-and-lint, changes, docker-e2e ]
190-
if: ${{ needs.changes.outputs.agent == 'true' }}
192+
if: github.event_name == 'schedule' || ${{ needs.changes.outputs.agent == 'true' }}
191193
runs-on: ubuntu-latest
192194
timeout-minutes: 20
193195
strategy:

0 commit comments

Comments
 (0)