forked from microsoft/TypeAgent
-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (111 loc) · 3.57 KB
/
shell-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
name: Shell Tests - Full Suite
on:
#push:
# branches: ["main"]
schedule:
- cron: "0 0 * * *" #start of every day
permissions:
id-token: write
contents: read
env:
NODE_OPTIONS: --max_old_space_size=8192
# DEBUG: pw:browser* # PlayWright debug messages
# ELECTRON_ENABLE_LOGGING: true # Electron debug messages
# DEBUG: typeagent:* # TypeAgent debug messages
# run only one of these at a time
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
build_ts:
strategy:
fail-fast: false
matrix:
os: ["windows-latest", "ubuntu-latest"]
version: [20]
runs-on: ${{ matrix.os }}
steps:
- if: runner.os == 'Linux'
run: |
sudo apt install libsecret-1-0
- name: Setup Git LF
run: |
git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
ts:
- "ts/**"
- ".github/workflows/build-ts.yml"
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
package_json_file: ts/package.json
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
cache: "pnpm"
cache-dependency-path: ts/pnpm-lock.yaml
- name: Install dependencies (pnpm)
working-directory: ts
run: |
pnpm install --frozen-lockfile --strict-peer-dependencies
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
working-directory: ts/packages/shell
- name: Build repo
working-directory: ts
run: |
npm run build
- name: Login to Azure
uses: azure/[email protected]
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_5B0D2D6BA40F4710B45721D2112356DD }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_39BB903136F14B6EAD8F53A8AB78E3AA }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_F36C1F2C4B2C49CA8DD5C52FAB98FA30 }}
- name: Get Keys
run: |
node tools/scripts/getKeys.mjs --vault build-pipeline-kv
working-directory: ts
- name: Test CLI - verify .env & endpoint connectivity
run: |
npm run start:dev 'prompt' 'why is the sky blue'
working-directory: ts/packages/cli
- name: Shell Tests (windows)
if: ${{ runner.os == 'windows' }}
timeout-minutes: 60
run: |
npm run shell:test
working-directory: ts/packages/shell
continue-on-error: true
- name: Shell Tests (linux)
if: ${{ runner.os == 'Linux' }}
timeout-minutes: 60
run: |
Xvfb :99 -screen 0 1600x1200x24 & export DISPLAY=:99
npm run shell:test
working-directory: ts/packages/shell
continue-on-error: true
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: test-results
path: ts/packages/shell/test-results/
overwrite: true
retention-days: 30
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: ts/packages/shell/playwright-report/
overwrite: true
retention-days: 30
- name: Clean up Keys
run: |
rm ./.env
working-directory: ts
if: always()