microsoft/TypeAgent

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
8fc4043df7e33ba9b36eda42affda40edbbd08ef

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/build-ts.yml

77lines · 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
25jobs:
26 build_ts:
27 strategy:
28 fail-fast: false
29 matrix:
30 os: ["ubuntu-latest", "windows-latest", "macos-latest"]
31 version: [18, 20]
32
33 runs-on: ${{ matrix.os }}
34 steps:
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 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
48 name: Install pnpm
49 with:
50 version: 9
51 run_install: false
52 - uses: actions/setup-node@v4
53 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
54 with:
55 node-version: ${{ matrix.version }}
56 cache: "pnpm"
57 cache-dependency-path: ts/pnpm-lock.yaml
58 - name: Install dependencies
59 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
60 working-directory: ts
61 run: |
62 pnpm install --frozen-lockfile --strict-peer-dependencies
63 - name: Build
64 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
65 working-directory: ts
66 run: |
67 npm run build
68 - name: Test
69 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
70 working-directory: ts
71 run: |
72 npm run test
73 - name: Lint
74 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
75 working-directory: ts
76 run: |
77 npm run lint