microsoft/TypeAgent

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
aeb802854fa1b0f1aa92f4ccbf839cb2a48ad3cb

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/build-ts.yml

83lines · modecode

1# Copyright (c) Microsoft Corporation.
2# Licensed under the MIT License.
3
4# This workflow will build the TypeAgent TypeScript code
5
6name: build-ts
7
8on:
9 workflow_dispatch:
10 push:
11 branches: ["main"]
12 pull_request:
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
29jobs:
30 build_ts:
31 strategy:
32 fail-fast: false
33 matrix:
34 os: ["ubuntu-latest", "windows-latest", "macos-latest"]
35 version: [18, 20, 22]
36
37 runs-on: ${{ matrix.os }}
38 steps:
39 - if: runner.os == 'Linux'
40 run: |
41 sudo apt install libsecret-1-0
42 - name: Setup Git LF
43 run: |
44 git config --global core.autocrlf false
45 - uses: actions/checkout@v4
46 - uses: dorny/paths-filter@v3
47 id: filter
48 with:
49 filters: |
50 ts:
51 - "ts/**"
52 - ".github/workflows/build-ts.yml"
53 - uses: pnpm/action-setup@v4
54 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
55 name: Install pnpm
56 with:
57 package_json_file: ts/package.json
58 - uses: actions/setup-node@v4
59 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
60 with:
61 node-version: ${{ matrix.version }}
62 cache: "pnpm"
63 cache-dependency-path: ts/pnpm-lock.yaml
64 - name: Install dependencies
65 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
66 working-directory: ts
67 run: |
68 pnpm install --frozen-lockfile --strict-peer-dependencies
69 - name: Build
70 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
71 working-directory: ts
72 run: |
73 npm run build
74 - name: Test
75 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
76 working-directory: ts
77 run: |
78 npm run test:local
79 - name: Lint
80 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
81 working-directory: ts
82 run: |
83 npm run lint
84