Skip to content

Add GitHub Action for TypeScript compile check #9

Add GitHub Action for TypeScript compile check

Add GitHub Action for TypeScript compile check #9

Workflow file for this run

name: 'check-ts'
# run this check on PRs
on:
pull_request:
jobs:
ts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install
uses: actions/setup-node@v3
- run: cd client
- run: npm ci
- run: cd ..
- run: cd server
- run: npx prisma generate
- run: npm ci
- run: cd ..
- run: cd client
- run: npm run build
# get the lines modified in this PR
# - name: Get diff lines
# id: diff
# uses: Equip-Collaboration/[email protected]
# with:
# include: '["\\.tsx?$"]'
# # get the files modified in this PR
# - name: Detecting files changed
# id: files
# uses: umani/[email protected]
# 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/[email protected]
# 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