-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (57 loc) · 2.26 KB
/
check_ts.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
53
54
55
56
57
58
59
60
61
name: 'check-ts'
# run this check on PRs
on:
pull_request:
branches: [main]
jobs:
ts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
- name: Install client depencies
working-directory: client
run: npm ci
- name: Install server depencies
working-directory: server
run: |
npx prisma generate
npm ci
- name: Run build
working-directory: client
run: |
npm run lint
npm run build
# get the lines modified in this PR
# - name: Get diff lines
# id: diff
# uses: Equip-Collaboration/diff-line-numbers@v1.0.0
# with:
# include: '["\\.tsx?$"]'
# # get the files modified in this PR
# - name: Detecting files changed
# id: files
# uses: umani/changed-files@v4.0.0
# with:
# repo-token: ${{ github.token }}
# pattern: '^.*\.tsx?$'
# # echo the changed files
# - name: List files changed
# run: |
# echo 'Files modified: ${{steps.files.outputs.files_updated}}'
# echo 'Files added: ${{steps.files.outputs.files_created}}'
# echo 'Files removed: ${{steps.files.outputs.files_deleted}}'
# # run the action
# - uses: Arhia/action-check-typescript@v1.0.0
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# use-check: true # if the action fails, the PR wil fail
# check-fail-mode: added # only check for added errors
# files-changed: ${{steps.files.outputs.files_updated}}
# files-added: ${{steps.files.outputs.files_created}}
# files-deleted: ${{steps.files.outputs.files_deleted}}
# line-numbers: ${{steps.diff.outputs.lineNumbers}}
# output-behaviour: both # use github annotations and comments on the PR
# comment-behaviour: new # every run of this action will create a new comment
# ts-config-path: './client/tsconfig.json' # use the tsconfig.json in the client directory