Skip to content
22 changes: 13 additions & 9 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ on:
workflow_dispatch:
push:
branches: ["main"]
#paths:
# - 'ts/**' # only run on changes to ts/ folder
pull_request_target:
branches: ["main"]
#paths:
# - 'ts/**' # only run on changes to ts/ folder
merge_group:
branches: ["main"]
concurrency:
Expand Down Expand Up @@ -87,67 +83,75 @@ jobs:
filters: |
ts:
- "ts/**"
- ".github/workflows/build-ts.yml"
- ".github/workflows/smoke-tests.yml"

- uses: pnpm/action-setup@v4
if: ${{ steps.filter.outputs.ts != 'false' }}
name: Install pnpm
with:
package_json_file: ts/package.json

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

- name: Install dependencies
if: ${{ steps.filter.outputs.ts != 'false' }}
working-directory: ts
run: |
pnpm install --frozen-lockfile --strict-peer-dependencies

- name: Install Playwright Browsers
if: ${{ steps.filter.outputs.ts != 'false' }}
run: pnpm exec playwright install --with-deps
working-directory: ts/packages/shell

- name: Build
if: ${{ steps.filter.outputs.ts != 'false' }}
working-directory: ts
run: |
npm run build

- name: Login to Azure
if: ${{ steps.filter.outputs.ts != 'false' }}
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_5B0D2D6BA40F4710B45721D2112356DD }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_39BB903136F14B6EAD8F53A8AB78E3AA }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_F36C1F2C4B2C49CA8DD5C52FAB98FA30 }}

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

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

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

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

- name: Live Tests (Linux)
if: ${{ runner.os == 'Linux' }}
if: ${{ steps.filter.outputs.ts != 'false' && runner.os == 'Linux' }}
timeout-minutes: 60
run: |
npm run test:live
Expand Down
Loading