jobs:
php:
- name: PHP CodeSniffer
+ name: PHP
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- - run: git clone --branch=5.2 --depth=1 --quiet git://github.com/WoltLab/WCF.git WCF
- - uses: chekalsky/phpcs-action@e269c2f264f400adcda7c6b24c8550302350d495
+ - name: phpcs
+ uses: chekalsky/phpcs-action@e269c2f264f400adcda7c6b24c8550302350d495
+ - name: Setup PHP with tools
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: '8.0'
+ extensions: ctype, dom, exif, gd, gmp, hash, intl, json, libxml, mbstring, opcache, pcre, pdo, pdo_mysql, zlib
+ tools: php-cs-fixer:2.19.0
+ - name: php-cs-fixer
+ run: php-cs-fixer fix --dry-run --diff-format udiff
+ ts:
+ name: TS Prettier
+ runs-on: ubuntu-latest
+ steps:
- - uses: actions/checkout@v2
++ - uses: actions/checkout@v3
+ - name: Set up node.js
+ uses: actions/setup-node@v2
+ with:
+ node-version: "16"
+ cache: "npm"
+ - run: npm install
+ - name: Run prettier
+ run: |
+ shopt -s globstar
+ npx prettier -w ts/**/*.ts
+ - run: echo "::add-matcher::.github/diff.json"
+ - name: Show diff
+ run: |
+ git checkout -- package-lock.json
+ git diff --exit-code
+ scss:
+ name: SCSS Prettier
+ runs-on: ubuntu-latest
+ steps:
- - uses: actions/checkout@v2
++ - uses: actions/checkout@v3
+ - name: Set up node.js
+ uses: actions/setup-node@v2
+ with:
+ node-version: "16"
+ cache: "npm"
+ - run: npm install
+ - name: Run prettier
+ run: |
+ shopt -s globstar
+ npx prettier -w files/style/*.scss
+ - run: echo "::add-matcher::.github/diff.json"
+ - name: Show diff
+ run: |
+ git checkout -- package-lock.json
+ git diff --exit-code
strategy:
fail-fast: false
steps:
- - uses: actions/checkout@v2
++ - uses: actions/checkout@v3
- name: Set up node.js
- uses: actions/setup-node@v1
+ uses: actions/setup-node@v2
with:
- node-version: "12"
- - uses: actions/checkout@v3
+ node-version: "16"
- run: echo "::add-matcher::.github/javascript-syntax.json"
- name: Remove files to be ignored
run: |
--- /dev/null
- - uses: actions/checkout@v2
+name: TypeScript
+
+on:
+ push:
+ branches:
+ - "5.4"
+ - master
+ pull_request:
+
+jobs:
+ tsc:
+ name: "TSC"
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ steps:
- - uses: actions/checkout@v2
++ - uses: actions/checkout@v3
+ - name: Set up node.js
+ uses: actions/setup-node@v2
+ with:
+ node-version: "16"
+ cache: "npm"
+ - run: npm install
+ - run: npx tsc --noEmit
+ eslint:
+ name: "eslint"
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ steps:
- - uses: actions/checkout@v2
++ - uses: actions/checkout@v3
+ - name: Set up node.js
+ uses: actions/setup-node@v2
+ with:
+ node-version: "16"
+ cache: "npm"
+ - run: npm install
+ - run: npx eslint .
+ javascript_sync:
+ name: "Check for outdated JavaScript"
+ needs: tsc
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ steps:
++ - uses: actions/checkout@v3
+ - name: Set up node.js
+ uses: actions/setup-node@v2
+ with:
+ node-version: "16"
+ cache: "npm"
+ - run: npm install
+ - run: npx tsc
+ - run: echo "::add-matcher::.github/diff.json"
+ - name: Show diff
+ run: |
+ git checkout -- package-lock.json
+ git diff --exit-code