-
Notifications
You must be signed in to change notification settings - Fork 145
56 lines (53 loc) · 1.66 KB
/
javascript.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: JavaScript
on:
push:
branches:
- "5.2"
- "5.3"
- "5.4"
- "5.5"
- master
pull_request:
permissions:
contents: read
jobs:
syntax:
name: "Check Syntax"
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Set up node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- uses: actions/checkout@v3
- run: echo "::add-matcher::.github/javascript-syntax.json"
- name: Remove files to be ignored
run: |
true
- run: |
! find wcfsetup/ -type f -name '*.js' -exec node -c '{}' \; 2>&1 \
|awk 'BEGIN {m=0} /(.js):[0-9]+$/ {m=1; printf "%s - ",$0} m==1 && /^SyntaxError/ { m=0; print }' \
|sed "s@$(pwd)@.@" \
|grep '^'
dependency:
name: "Check that npm dependencies are in sync"
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm install
- name: "Check 'focus-trap'"
run: |
diff -wu wcfsetup/install/files/js/3rdParty/focus-trap/focus-trap.umd.min.js node_modules/focus-trap/dist/focus-trap.umd.min.js
diff -wu wcfsetup/install/files/js/3rdParty/focus-trap/focus-trap.umd.min.js.map node_modules/focus-trap/dist/focus-trap.umd.min.js.map
- name: "Check 'tabbable'"
run: |
diff -wu wcfsetup/install/files/js/3rdParty/focus-trap/index.umd.min.js node_modules/tabbable/dist/index.umd.min.js
diff -wu wcfsetup/install/files/js/3rdParty/focus-trap/index.umd.min.js.map node_modules/tabbable/dist/index.umd.min.js.map