microsoft/TypeAgent

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
b79dd057aaddccfd494b918bce86e931a4284cdb

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/shell-tests.yml

120lines · modecode

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