Update workflows
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 21 Oct 2020 13:56:40 +0000 (15:56 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 21 Oct 2020 13:56:40 +0000 (15:56 +0200)
.github/workflows/codestyle.yml [new file with mode: 0644]
.github/workflows/php-syntax.yml
.phpcs.xml [new file with mode: 0644]
.travis.yml [deleted file]

diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml
new file mode 100644 (file)
index 0000000..74d4fd0
--- /dev/null
@@ -0,0 +1,18 @@
+name: Code Style
+
+on:
+  push:
+    branches:
+    - "5.2"
+    - "5.3"
+    - master
+  pull_request:
+
+jobs:
+  php:
+    name: Run PHP CodeSniffer
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - run: git clone --branch=master --depth=1 --quiet git://github.com/WoltLab/WCF.git WCF
+    - uses: chekalsky/phpcs-action@e269c2f264f400adcda7c6b24c8550302350d495
index e58370db44615b25f17d59ed1bc59df759c3e75d..667e9eefae74cd016b642994355800ae9bd65eab 100644 (file)
@@ -2,6 +2,10 @@ name: PHP Syntax Check
 
 on:
   push:
+    branches:
+    - "5.2"
+    - "5.3"
+    - master
   pull_request:
 
 jobs:
diff --git a/.phpcs.xml b/.phpcs.xml
new file mode 100644 (file)
index 0000000..57a48ad
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<ruleset>
+       <file>files/</file>
+       <arg name="extensions" value="php" />
+       <arg value="p"/>
+       <arg name="basepath" value="."/>
+
+       <rule ref="./WCF/CodeSniff/WCF/ruleset.xml"/>
+</ruleset>
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644 (file)
index 894dd50..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-language: php
-sudo: false
-php:
-  - 7.4
-  - 7.2
-before_install:
-  - export PATH="$PATH:$(composer global config bin-dir --absolute)"
-  - composer global require "squizlabs/php_codesniffer=3.*"
-  - phpenv rehash
-before_script:
-  - git clone --branch=master --depth=1 --quiet git://github.com/WoltLab/WCF.git WCF
-script:
-  - phpcs -p --extensions=php --standard="`pwd`/WCF/CodeSniff/WCF" files