microsoft/TypeAgent

Public

mirrored from https://github.com/microsoft/TypeAgentAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
f8bb760fa7ccfd347d30af87bba3a137c75ee74e

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/smoke-tests.yml

140lines · modecode

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