-
Notifications
You must be signed in to change notification settings - Fork 150
52 lines (49 loc) · 1.44 KB
/
typescript-pr-check.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
#
# Copyright (c) 2020-2021 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
name: typescript
on:
pull_request:
paths:
- '**/package.json'
- 'tools/**/*.ts'
- '.github/workflows/typescript-pr-check.yml'
push:
paths:
- '**/package.json'
- 'tools/**/*.ts'
- '.github/workflows/typescript-pr-check.yml'
jobs:
check:
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-node@v4
with:
node-version: '18'
- name: Clone source code
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: yarn-
- name: typescript
run: |
yarn --version
yarn
yarn --cwd ./tools/build/ run build
- name: report-coverage
uses: codecov/codecov-action@v4
with:
files: ./tools/pr-check/coverage/coverage-final.json,./tools/build/coverage/coverage-final.json