Skip to content

Commit 82a47da

Browse files
authored
Proper conditions for running smoke tests (#1746)
1 parent 4cc4fc8 commit 82a47da

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/smoke-tests.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ on:
99
workflow_dispatch:
1010
push:
1111
branches: ["main"]
12-
#paths:
13-
# - 'ts/**' # only run on changes to ts/ folder
1412
pull_request_target:
1513
branches: ["main"]
16-
#paths:
17-
# - 'ts/**' # only run on changes to ts/ folder
1814
merge_group:
1915
branches: ["main"]
2016
concurrency:
@@ -87,67 +83,75 @@ jobs:
8783
filters: |
8884
ts:
8985
- "ts/**"
90-
- ".github/workflows/build-ts.yml"
86+
- ".github/workflows/smoke-tests.yml"
9187
9288
- uses: pnpm/action-setup@v4
89+
if: ${{ steps.filter.outputs.ts != 'false' }}
9390
name: Install pnpm
9491
with:
9592
package_json_file: ts/package.json
9693

9794
- uses: actions/setup-node@v4
95+
if: ${{ steps.filter.outputs.ts != 'false' }}
9896
with:
9997
node-version: ${{ matrix.version }}
10098
cache: "pnpm"
10199
cache-dependency-path: ts/pnpm-lock.yaml
102100

103101
- name: Install dependencies
102+
if: ${{ steps.filter.outputs.ts != 'false' }}
104103
working-directory: ts
105104
run: |
106105
pnpm install --frozen-lockfile --strict-peer-dependencies
107106
108107
- name: Install Playwright Browsers
108+
if: ${{ steps.filter.outputs.ts != 'false' }}
109109
run: pnpm exec playwright install --with-deps
110110
working-directory: ts/packages/shell
111111

112112
- name: Build
113+
if: ${{ steps.filter.outputs.ts != 'false' }}
113114
working-directory: ts
114115
run: |
115116
npm run build
116117
117118
- name: Login to Azure
119+
if: ${{ steps.filter.outputs.ts != 'false' }}
118120
uses: azure/login@v2.2.0
119121
with:
120122
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_5B0D2D6BA40F4710B45721D2112356DD }}
121123
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_39BB903136F14B6EAD8F53A8AB78E3AA }}
122124
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_F36C1F2C4B2C49CA8DD5C52FAB98FA30 }}
123125

124126
- name: Get Keys
127+
if: ${{ steps.filter.outputs.ts != 'false' }}
125128
run: |
126129
node tools/scripts/getKeys.mjs --vault build-pipeline-kv
127130
working-directory: ts
128131

129-
- name: Test CLI - smoke
132+
- name: Test CLI - smoke
133+
if: ${{ steps.filter.outputs.ts != 'false' }}
130134
run: |
131135
npm run start:dev 'prompt' 'why is the sky blue'
132136
working-directory: ts/packages/cli
133137

134138
- name: Shell Tests - full (windows)
135-
if: ${{ runner.os == 'windows' }}
139+
if: ${{ steps.filter.outputs.ts != 'false' && runner.os == 'windows'}}
136140
timeout-minutes: 60
137141
run: |
138142
npm run shell:test
139143
working-directory: ts/packages/shell
140144

141145
- name: Shell Tests - smoke (linux)
142-
if: ${{ runner.os == 'Linux' }}
146+
if: ${{ steps.filter.outputs.ts != 'false' && runner.os == 'Linux' }}
143147
timeout-minutes: 60
144148
run: |
145149
Xvfb :99 -screen 0 1600x1200x24 & export DISPLAY=:99
146150
npm run shell:smoke
147151
working-directory: ts/packages/shell
148152

149153
- name: Live Tests (Linux)
150-
if: ${{ runner.os == 'Linux' }}
154+
if: ${{ steps.filter.outputs.ts != 'false' && runner.os == 'Linux' }}
151155
timeout-minutes: 60
152156
run: |
153157
npm run test:live

0 commit comments

Comments
 (0)