forked from ustaxcourt/ef-cms
-
Notifications
You must be signed in to change notification settings - Fork 10
43 lines (34 loc) · 1.1 KB
/
typescript-all-files-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
name: Typescript File Check
on:
pull_request:
jobs:
CheckAllFilesForTypeErrorCount:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Determine Target Branch
id: target_branch
run: |
echo "GITHUB_EVENT_PATH: $GITHUB_EVENT_PATH"
TARGET_BRANCH=$(jq -r '.pull_request.base.ref' $GITHUB_EVENT_PATH)
echo "TARGET_BRANCH: $TARGET_BRANCH"
echo "TARGET_BRANCH=$TARGET_BRANCH" >> $GITHUB_ENV
- name: Checkout Target Branch
uses: actions/checkout@v4
with:
repository: ustaxcourt/ef-cms
ref: ${{ env.TARGET_BRANCH }}
path: targetBranch
- uses: actions/setup-node@v4
with:
node-version: '20.14.0'
- name: NPM Install in your branch
run: npm ci
- name: NPM Install in target branch
working-directory: ./targetBranch
run: npm ci
- name: Check files for increased error count
run: npx ts-node scripts/checkAllFilesForTypeErrorCount.ts