Skip to content

Commit 902cc0a

Browse files
committed
🤖 Skip storybook and e2e tests when test_filter is set
When running workflow_dispatch with a test filter for debugging specific unit/integration tests, skip the expensive storybook and e2e test jobs to keep iteration times fast.
1 parent f8ba9ff commit 902cc0a

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ jobs:
113113
storybook-test:
114114
name: Storybook Interaction Tests
115115
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
116+
if: github.event.inputs.test_filter == ''
116117
steps:
117118
- name: Checkout code
118119
uses: actions/checkout@v4
@@ -133,16 +134,12 @@ jobs:
133134
sleep 5
134135
135136
- name: Run Storybook tests
136-
run: |
137-
if [ -n "${{ github.event.inputs.test_filter }}" ]; then
138-
bun x test-storybook --stories-json --url http://localhost:6006 ${{ github.event.inputs.test_filter }}
139-
else
140-
make test-storybook
141-
fi
137+
run: make test-storybook
142138

143139
e2e-test:
144140
name: End-to-End Tests
145141
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
142+
if: github.event.inputs.test_filter == ''
146143
steps:
147144
- name: Checkout code
148145
uses: actions/checkout@v4
@@ -163,18 +160,9 @@ jobs:
163160
run: bun x playwright install --with-deps
164161

165162
- name: Run e2e tests
166-
run: |
167-
if [ -n "${{ github.event.inputs.test_filter }}" ]; then
168-
make build
169-
xvfb-run -a bun x playwright test --project=electron --grep "${{ github.event.inputs.test_filter }}"
170-
else
171-
xvfb-run -a make test-e2e
172-
fi
163+
run: xvfb-run -a make test-e2e
173164
env:
174165
ELECTRON_DISABLE_SANDBOX: 1
175-
CMUX_E2E_LOAD_DIST: 1
176-
CMUX_E2E_SKIP_BUILD: 1
177-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
178166

179167
check-codex-comments:
180168
name: Check Codex Comments

0 commit comments

Comments
 (0)