Add basic typescript support (#143)
[GitHub/WoltLab/com.woltlab.wcf.conversation.git] / .github / workflows / typescript.yml
1 name: TypeScript
2
3 on:
4 push:
5 branches:
6 - master
7 pull_request:
8
9 jobs:
10 tsc:
11 name: "TSC"
12 runs-on: ubuntu-latest
13 strategy:
14 fail-fast: false
15 steps:
16 - name: Set up node.js
17 uses: actions/setup-node@v1
18 with:
19 node-version: "12"
20 - uses: actions/checkout@v2
21 - run: npm install
22 - run: echo "::add-matcher::.github/typescript-tsc.json"
23 - run: npx tsc --noEmit
24 eslint:
25 name: "eslint"
26 runs-on: ubuntu-latest
27 strategy:
28 fail-fast: false
29 steps:
30 - name: Set up node.js
31 uses: actions/setup-node@v1
32 with:
33 node-version: "12"
34 - uses: actions/checkout@v2
35 - run: npm install
36 - run: npx eslint .
37 javascript_sync:
38 name: "Check for outdated JavaScript"
39 needs: tsc
40 runs-on: ubuntu-latest
41 strategy:
42 fail-fast: false
43 steps:
44 - name: Set up node.js
45 uses: actions/setup-node@v1
46 with:
47 node-version: "12"
48 - uses: actions/checkout@v2
49 - run: npm install
50 - run: npx tsc
51 - run: echo "::add-matcher::.github/diff.json"
52 - name: Show diff
53 run: |
54 git checkout -- package-lock.json
55 git diff --exit-code