Skip to content

Commit d126814

Browse files
committed
update e2e
1 parent cccc3a9 commit d126814

1 file changed

Lines changed: 32 additions & 3 deletions

File tree

.github/workflows/e2e.yaml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
types: [completed]
88
branches: [master]
99

10-
# TODO: Remove after validating the workflow works
1110
pull_request:
1211
branches: [master]
1312

@@ -23,11 +22,41 @@ concurrency:
2322
cancel-in-progress: false
2423

2524
jobs:
25+
changes:
26+
name: Detect changes
27+
28+
runs-on: ubuntu-latest
29+
30+
permissions:
31+
pull-requests: read
32+
33+
outputs:
34+
source: ${{ steps.filter.outputs.source }}
35+
36+
steps:
37+
- uses: actions/checkout@v6
38+
39+
- uses: dorny/paths-filter@v3
40+
id: filter
41+
with:
42+
filters: |
43+
source:
44+
- 'src/**'
45+
- 'test/**'
46+
- 'package.json'
47+
- 'pnpm-lock.yaml'
48+
- 'pnpm-workspace.yaml'
49+
- 'tsconfig*.json'
50+
- 'tsdown.config.*'
51+
- 'vitest.config.*'
52+
2653
e2e:
2754
if: >
2855
startsWith(github.repository, 'apify/') &&
29-
(github.event_name != 'workflow_run' ||
30-
github.event.workflow_run.conclusion == 'success')
56+
(github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') &&
57+
(github.event_name != 'pull_request' || needs.changes.outputs.source == 'true')
58+
59+
needs: [changes]
3160

3261
name: E2E Tests (${{ matrix.os }})
3362
timeout-minutes: 30

0 commit comments

Comments
 (0)