Add 'ts' to codestyle workflow
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 29 Oct 2020 16:03:36 +0000 (17:03 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 29 Oct 2020 16:03:36 +0000 (17:03 +0100)
.github/diff.json [new file with mode: 0644]
.github/typescript-tsc_not_run.json [deleted file]
.github/workflows/codestyle.yml
.github/workflows/typescript.yml

diff --git a/.github/diff.json b/.github/diff.json
new file mode 100644 (file)
index 0000000..bacc71a
--- /dev/null
@@ -0,0 +1,14 @@
+{
+  "problemMatcher": [
+    {
+      "owner": "diff",
+      "pattern": [
+        {
+          "regexp": "--- a/(wcfsetup/(.*))",
+          "file": 2,
+          "message": 1
+        }
+      ]
+    }
+  ]
+}
diff --git a/.github/typescript-tsc_not_run.json b/.github/typescript-tsc_not_run.json
deleted file mode 100644 (file)
index 90b3999..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-  "problemMatcher": [
-    {
-      "owner": "tsc not run",
-      "pattern": [
-        {
-          "regexp": "--- a/(wcfsetup/(.*))",
-          "file": 2,
-          "message": 1
-        }
-      ]
-    }
-  ]
-}
index 9612dfc92979619d650b682db69dfcffeccfd85a..0c2b1546cd1316083121b461be7e3f6fdc34fdcd 100644 (file)
@@ -15,3 +15,15 @@ jobs:
     steps:
     - uses: actions/checkout@v2
     - uses: chekalsky/phpcs-action@e269c2f264f400adcda7c6b24c8550302350d495
+  ts:
+    name: TS Prettier
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - run: npm install
+    - run: |
+        shopt -s globstar
+        npx pretter -w wcfsetup/install/files/ts/**/*.ts
+    - run: echo "::add-matcher::.github/diff.json"
+    - run: |
+        git diff --exit-code
index 5837713aadee91c2b304f7a0d611224a990e5493..7de058bd648c23227f395d54e7c00c381732b20a 100644 (file)
@@ -37,6 +37,6 @@ jobs:
     - uses: actions/checkout@v2
     - run: npm install
     - run: npx tsc
-    - run: echo "::add-matcher::.github/typescript-tsc_not_run.json"
+    - run: echo "::add-matcher::.github/diff.json"
     - run: |
         git diff --exit-code