microsoft/TypeAgent

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
ca5f385b23f2caef43ded65cb3d1fed21117e6cb

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/smoke-tests.yml

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