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