c2ef1b561c21203088f28ade9b8e92531c6e41a9
[GitHub/WoltLab/com.woltlab.wcf.conversation.git] / .github / workflows / javascript.yml
1 name: JavaScript
2
3 on:
4 push:
5 branches:
6 - "5.2"
7 - "5.3"
8 - master
9 pull_request:
10
11 jobs:
12 syntax:
13 name: "Check Syntax"
14 runs-on: ubuntu-latest
15 strategy:
16 fail-fast: false
17 steps:
18 - name: Set up node.js
19 uses: actions/setup-node@v1
20 with:
21 node-version: "12"
22 - uses: actions/checkout@v2
23 - run: echo "::add-matcher::.github/javascript-syntax.json"
24 - name: Remove files to be ignored
25 run: |
26 true
27 - run: |
28 ! find . -type f -name '*.js' -exec node -c '{}' \; 2>&1 \
29 |awk 'BEGIN {m=0} /(.js):[0-9]+$/ {m=1; printf "%s - ",$0} m==1 && /^SyntaxError/ { m=0; print }' \
30 |sed "s@$(pwd)@.@" \
31 |grep '^'