Skip to content

Commit a9d5a89

Browse files
authored
Added smoke test (#617)
1 parent 75fa859 commit a9d5a89

File tree

3 files changed

+265
-7
lines changed

3 files changed

+265
-7
lines changed

.github/workflows/build-ts.yml

+13-7
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ jobs:
6666
working-directory: ts
6767
run: |
6868
pnpm install --frozen-lockfile --strict-peer-dependencies
69-
- name: Install Playwright Browsers
70-
if: ${{ runner.os == 'windows' && matrix.version == '22' }}
71-
run: pnpm exec playwright install --with-deps
72-
working-directory: ts/packages/shell
69+
# - name: Install Playwright Browsers
70+
# if: ${{ runner.os == 'windows' && matrix.version == '22' }}
71+
# run: pnpm exec playwright install --with-deps
72+
# working-directory: ts/packages/shell
7373
- name: Build
7474
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
7575
working-directory: ts
@@ -103,12 +103,19 @@ jobs:
103103
# npm run start:dev 'prompt' 'why is the sky blue'
104104
# working-directory: ts/packages/cli
105105
# continue-on-error: true
106-
# - name: Shell Tests - smoke
106+
# - name: Shell Tests - smoke (windows)
107107
# if: ${{ github.event_name != 'merge_group' && runner.os == 'windows' && matrix.version == '22' }}
108108
# timeout-minutes: 60
109109
# run: |
110110
# npx playwright test simple.spec.ts
111111
# rm ../../.env
112+
# - name: Shell Tests - smoke (linux)
113+
# if: ${{ github.event_name != 'merge_group' && runner.os == 'Linux' && matrix.version == '22' }}
114+
# timeout-minutes: 60
115+
# run: |
116+
# Xvfb :99 -screen 0 1600x1200x24 & export DISPLAY=:99
117+
# npx playwright test simple.spec.ts
118+
# rm ../../.env
112119
# working-directory: ts/packages/shell
113120
# continue-on-error: true
114121
# - name: Live Tests
@@ -117,5 +124,4 @@ jobs:
117124
# run: |
118125
# npm run test:live
119126
# working-directory: ts
120-
# continue-on-error: true
121-
127+
# continue-on-error: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
# This workflow runs live/smoke sanity tests
5+
6+
name: smoke-tests
7+
8+
on:
9+
workflow_dispatch:
10+
pull_request_target:
11+
branches: ["main"]
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
17+
permissions:
18+
pull-requests: read
19+
contents: read
20+
id-token: write
21+
22+
env:
23+
NODE_OPTIONS: --max_old_space_size=8192
24+
25+
jobs:
26+
shell_and_cli:
27+
environment: development-forks # required for federated credentials
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
#os: ["ubuntu-latest", "windows-latest", "macos-latest"]
32+
os: ["ubuntu-latest"]
33+
version: [20]
34+
35+
runs-on: ${{ matrix.os }}
36+
steps:
37+
- if: runner.os == 'Linux'
38+
run: |
39+
sudo apt install libsecret-1-0
40+
41+
- name: Setup Git LF
42+
run: |
43+
git config --global core.autocrlf false
44+
45+
- uses: actions/checkout@v4
46+
47+
- uses: dorny/paths-filter@v3
48+
id: filter
49+
with:
50+
filters: |
51+
ts:
52+
- "ts/**"
53+
- ".github/workflows/build-ts.yml"
54+
55+
- uses: pnpm/action-setup@v4
56+
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
57+
name: Install pnpm
58+
with:
59+
package_json_file: ts/package.json
60+
61+
- uses: actions/setup-node@v4
62+
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
63+
with:
64+
node-version: ${{ matrix.version }}
65+
cache: "pnpm"
66+
cache-dependency-path: ts/pnpm-lock.yaml
67+
- name: Install dependencies
68+
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
69+
working-directory: ts
70+
run: |
71+
pnpm install --frozen-lockfile --strict-peer-dependencies
72+
73+
- name: Install Playwright Browsers
74+
run: pnpm exec playwright install --with-deps
75+
working-directory: ts/packages/shell
76+
77+
- name: Build
78+
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
79+
working-directory: ts
80+
run: |
81+
npm run build
82+
83+
- name: Login to Azure
84+
uses: azure/[email protected]
85+
with:
86+
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_5B0D2D6BA40F4710B45721D2112356DD }}
87+
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_39BB903136F14B6EAD8F53A8AB78E3AA }}
88+
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_F36C1F2C4B2C49CA8DD5C52FAB98FA30 }}
89+
90+
- name: Get Keys
91+
run: |
92+
node tools/scripts/getKeys.mjs --vault build-pipeline-kv
93+
working-directory: ts
94+
95+
- name: Test CLI - smoke
96+
run: |
97+
npm run start:dev 'prompt' 'why is the sky blue'
98+
working-directory: ts/packages/cli
99+
continue-on-error: true
100+
101+
- name: Shell Tests - smoke (windows)
102+
if: ${{ runner.os == 'windows' }}
103+
timeout-minutes: 60
104+
run: |
105+
npx playwright test simple.spec.ts
106+
rm ../../.env
107+
108+
- name: Shell Tests - smoke (linux)
109+
if: ${{ runner.os == 'Linux' }}
110+
timeout-minutes: 60
111+
run: |
112+
Xvfb :99 -screen 0 1600x1200x24 & export DISPLAY=:99
113+
npx playwright test simple.spec.ts
114+
rm ../../.env
115+
working-directory: ts/packages/shell
116+
continue-on-error: true
117+
118+
- name: Live Tests
119+
if: ${{ runner.os == 'linux' }}
120+
timeout-minutes: 60
121+
run: |
122+
npm run test:live
123+
working-directory: ts
124+
continue-on-error: true

.github/workflows/smoke-tests.yml

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
# This workflow runs live/smoke sanity tests
5+
6+
name: smoke-tests
7+
8+
on:
9+
workflow_dispatch:
10+
push:
11+
branches: ["main"]
12+
pull_request:
13+
branches: ["main"]
14+
merge_group:
15+
branches: ["main"]
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
19+
cancel-in-progress: true
20+
21+
permissions:
22+
pull-requests: read
23+
contents: read
24+
id-token: write
25+
26+
env:
27+
NODE_OPTIONS: --max_old_space_size=8192
28+
29+
jobs:
30+
shell_and_cli:
31+
environment: development # required for federated credentials
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
#os: ["ubuntu-latest", "windows-latest", "macos-latest"]
36+
os: ["ubuntu-latest"]
37+
version: [20]
38+
39+
runs-on: ${{ matrix.os }}
40+
steps:
41+
- if: runner.os == 'Linux'
42+
run: |
43+
sudo apt install libsecret-1-0
44+
45+
- name: Setup Git LF
46+
run: |
47+
git config --global core.autocrlf false
48+
49+
- uses: actions/checkout@v4
50+
51+
- uses: dorny/paths-filter@v3
52+
id: filter
53+
with:
54+
filters: |
55+
ts:
56+
- "ts/**"
57+
- ".github/workflows/build-ts.yml"
58+
59+
- uses: pnpm/action-setup@v4
60+
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
61+
name: Install pnpm
62+
with:
63+
package_json_file: ts/package.json
64+
65+
- uses: actions/setup-node@v4
66+
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
67+
with:
68+
node-version: ${{ matrix.version }}
69+
cache: "pnpm"
70+
cache-dependency-path: ts/pnpm-lock.yaml
71+
- name: Install dependencies
72+
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
73+
working-directory: ts
74+
run: |
75+
pnpm install --frozen-lockfile --strict-peer-dependencies
76+
77+
- name: Install Playwright Browsers
78+
run: pnpm exec playwright install --with-deps
79+
working-directory: ts/packages/shell
80+
81+
- name: Build
82+
if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
83+
working-directory: ts
84+
run: |
85+
npm run build
86+
87+
- name: Login to Azure
88+
uses: azure/[email protected]
89+
with:
90+
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_5B0D2D6BA40F4710B45721D2112356DD }}
91+
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_39BB903136F14B6EAD8F53A8AB78E3AA }}
92+
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_F36C1F2C4B2C49CA8DD5C52FAB98FA30 }}
93+
94+
- name: Get Keys
95+
run: |
96+
node tools/scripts/getKeys.mjs --vault build-pipeline-kv
97+
working-directory: ts
98+
99+
- name: Test CLI - smoke
100+
run: |
101+
npm run start:dev 'prompt' 'why is the sky blue'
102+
working-directory: ts/packages/cli
103+
continue-on-error: true
104+
105+
- name: Shell Tests - smoke (windows)
106+
if: ${{ runner.os == 'windows' }}
107+
timeout-minutes: 60
108+
run: |
109+
npx playwright test simple.spec.ts
110+
rm ../../.env
111+
112+
- name: Shell Tests - smoke (linux)
113+
if: ${{ runner.os == 'Linux' }}
114+
timeout-minutes: 60
115+
run: |
116+
Xvfb :99 -screen 0 1600x1200x24 & export DISPLAY=:99
117+
npx playwright test simple.spec.ts
118+
rm ../../.env
119+
working-directory: ts/packages/shell
120+
continue-on-error: true
121+
122+
- name: Live Tests
123+
if: ${{ runner.os == 'linux' }}
124+
timeout-minutes: 60
125+
run: |
126+
npm run test:live
127+
working-directory: ts
128+
continue-on-error: true

0 commit comments

Comments
 (0)