Commit Graph

5 Commits

Author SHA1 Message Date
Andreas Gohr 7bbf38eeb4 avoid running tests twice for pull requests
This implements the suggested method from [1]. It runs tests on all pushes to
our own repository and for pull requests coming from other people's forks.

[1] https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662/10
2020-11-20 23:52:08 +01:00
Andreas Gohr 2cf7c325f8 Replace Appveyor and Travis with Github actions
Travis has recently introduced built limits which makes using them very
slow sometimes and I never really liked the setup for appveyor for our
Windows testing.

This makes use of github actions instead. Some notes:

* since we only support PHP 7.2+ anymore, nothing below is tested
* MySQL and Postgres auth backends are only tested on Linux (as before)
* I am not actually sure the problem matchers are working as intended
* There is currently no good way to run tests that are allowed to fail
  so no PHP 8 tests are run yet
* I haven't reestablished the no-gzip test runs again, I'm not sure they
  are still relevant on modern PHP systems
* PHP 7.4 currently fails because of https://github.com/MarcusSchwarz/lesserphp/pull/18
* I'm currently using @v2 tags for the used action. We had a discussion
  before if we should actually pin the action to a fixed commit. For
  sake of easier maintainance, I would argue to trust the setup-php
  action.
2020-11-20 23:50:01 +01:00
Michael Große 36faf6960d
Split out temporary code style excludes
Splitting them out allows for plugins to use _test/phpcs.xml as the
basis for their own linting without having an overly permissive coding
standard.
Also, this makes it more obvious and painful that these are just
intended as temporary exceptions and should be actually fixed.

The rule `Generic.ControlStructures.InlineControlStructure.NotAllowed`
has its comment adjust to make it clear that this is an intended
deviation from the PSR-2/PSR-12 coding standard.

The rule `PSR1.Classes.ClassDeclaration.MissingNamespace` has to remain
in the DokuWiki coding standard as the plugin base classes can currently
not reasonably be in namespaces.
2020-02-19 10:55:56 +01:00
Michael Große b5f2c105ff
Run code style checks on pull requests, too
This should make the code style checks also run on pull requests the
come from forks. Maybe also on old pull requests?
2020-01-21 22:06:11 +01:00
Michael Große e3cafdc28a
Check our code style for every PR
This excludes the currently failing checks with automatic fixes, as they
are out of scope of this commit. The current goal is automatically
reject pull requests that don't me the standards that the rest of our
code base already follows.
2020-01-06 19:48:19 +01:00