forked from matrix-org/matrix-js-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add static analysis for tsc --strict (matrix-org#2615)
* Initial attempt at CI to annotate new TSC errors * Make tsconfig file valid * enable debug * Specify commit * Fix commit specification * Switch back to main * Tweak permissions * Add strict mode failure * Attempt number two * Fix ts-extra-args * Add static analysis for tsc --strict
- Loading branch information
Showing
3 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,3 +54,38 @@ jobs: | |
|
||
- name: Generate Docs | ||
run: "yarn run gendoc" | ||
|
||
tsc-strict: | ||
name: Typescript Strict Error Checker | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: read | ||
checks: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get diff lines | ||
id: diff | ||
uses: Equip-Collaboration/[email protected] | ||
with: | ||
include: '["\\.tsx?$"]' | ||
|
||
- name: Detecting files changed | ||
id: files | ||
uses: futuratrepadeira/[email protected] | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
pattern: '^.*\.tsx?$' | ||
|
||
- uses: t3chguy/typescript-check-action@main | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
use-check: true | ||
check-fail-mode: added | ||
output-behaviour: annotate | ||
ts-extra-args: '--strict' | ||
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 }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,6 @@ | |
}, | ||
"include": [ | ||
"./src/**/*.ts", | ||
"./spec/**/*.ts", | ||
"./spec/**/*.ts" | ||
] | ||
} |