3.0.0 #204
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Type Check (tsc) | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
jobs: | |
type-check: | |
permissions: | |
contents: read | |
pull-requests: write | |
name: Type Check (tsc) | |
runs-on: ubuntu-latest | |
steps: | |
- name : π¦ Checkout project repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name : π¦ Setup Node + PNPM + install deps | |
uses: ./.github/actions/setup-node-pnpm-install | |
- name: π¦ Install Reviewdog | |
if: github.event_name == 'pull_request' | |
uses: reviewdog/action-setup@v1 | |
- name: πββοΈ Run TypeScript PR # Reviewdog tsc errorformat: %f:%l:%c - error TS%n: %m | |
# we only need to add the reviewdog step if it's a pull request | |
if: github.event_name == 'pull_request' | |
run: | | |
pnpm type-check | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-on-error -tee | |
env: | |
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: πββοΈ Run TypeScript Commit | |
# If it's not a Pull Request then we just need to run the type-check | |
if: github.event_name != 'pull_request' | |
run: pnpm type-check |