Skip to content

Commit 7952894

Browse files
authored
Skip C3 tests on *.md only changes (#6925)
1 parent 4c6aad0 commit 7952894

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

.github/workflows/c3-e2e-experimental.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ on:
55
pull_request:
66
paths:
77
- packages/create-cloudflare/**
8-
push:
9-
branches:
10-
- main
11-
paths:
12-
- packages/create-cloudflare/**
138

149
jobs:
1510
e2e:
@@ -20,7 +15,7 @@ jobs:
2015
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.pm.name }}-${{ matrix.pm.version }}
2116
cancel-in-progress: true
2217
name: ${{ format('Run experimental tests for {0}@{1} on {2}', matrix.pm.name, matrix.pm.version, matrix.os) }}
23-
if: github.repository_owner == 'cloudflare' && github.event.pull_request.user.login != 'dependabot[bot]'
18+
if: github.event.pull_request.head.repo.owner.login == 'cloudflare' && github.event.pull_request.user.login != 'dependabot[bot]'
2419
strategy:
2520
fail-fast: false
2621
matrix:
@@ -43,7 +38,15 @@ jobs:
4338
with:
4439
fetch-depth: 0
4540

41+
- uses: dorny/paths-filter@v3
42+
id: changes
43+
with:
44+
filters: |
45+
everything_but_markdown:
46+
- '!**/*.md'
47+
4648
- name: Install Dependencies
49+
if: steps.changes.outputs.everything_but_markdown == 'true'
4750
uses: ./.github/actions/install-dependencies
4851
with:
4952
turbo-api: ${{ secrets.TURBO_API }}
@@ -52,6 +55,7 @@ jobs:
5255
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
5356

5457
- name: E2E Tests
58+
if: steps.changes.outputs.everything_but_markdown == 'true'
5559
uses: ./.github/actions/run-c3-e2e
5660
with:
5761
packageManager: ${{ matrix.pm.name }}

.github/workflows/c3-e2e.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ on:
55
pull_request:
66
paths:
77
- packages/create-cloudflare/**
8-
push:
9-
branches:
10-
- main
11-
paths:
12-
- packages/create-cloudflare/**
138

149
jobs:
1510
e2e:
@@ -20,7 +15,7 @@ jobs:
2015
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.pm.name }}-${{ matrix.pm.version }}
2116
cancel-in-progress: true
2217
name: ${{ format('Run tests for {0}@{1} on {2}', matrix.pm.name, matrix.pm.version, matrix.os) }}
23-
if: github.repository_owner == 'cloudflare' && github.event.pull_request.user.login != 'dependabot[bot]'
18+
if: github.event.pull_request.head.repo.owner.login == 'cloudflare' && github.event.pull_request.user.login != 'dependabot[bot]'
2419
strategy:
2520
fail-fast: false
2621
matrix:
@@ -43,7 +38,15 @@ jobs:
4338
with:
4439
fetch-depth: 0
4540

41+
- uses: dorny/paths-filter@v3
42+
id: changes
43+
with:
44+
filters: |
45+
everything_but_markdown:
46+
- '!**/*.md'
47+
4648
- name: Install Dependencies
49+
if: steps.changes.outputs.everything_but_markdown == 'true'
4750
uses: ./.github/actions/install-dependencies
4851
with:
4952
turbo-api: ${{ secrets.TURBO_API }}
@@ -52,6 +55,7 @@ jobs:
5255
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
5356

5457
- name: E2E Tests
58+
if: steps.changes.outputs.everything_but_markdown == 'true'
5559
uses: ./.github/actions/run-c3-e2e
5660
with:
5761
packageManager: ${{ matrix.pm.name }}

0 commit comments

Comments
 (0)