solid-nextcloud icon indicating copy to clipboard operation
solid-nextcloud copied to clipboard

Add QA Tools / Linters

Open Potherca opened this issue 4 years ago • 10 comments

We want to add CI/CD tools to all PDS Interop PHP repositories that are dependencies for this repository.

This ticket serves as full list of all the steps that need to be taken. For all repositories the steps are more or less the same:

  • Create a .github/workflows directory
  • Create a YAML workflow file to lint for PHP syntax errors
  • Create a YAML workflow file to check for PHP version compatibility (PHP Compat)
  • Create a YAML workflow file to check for style violations (PHP CodeSniffer)
  • Create a YAML workflow file to do security checks
  • Create a YAML workflow file to run PHPUnit tests (similar to tests.yml)

This means our worklist is:

  • solid-nextcloud

    • [x] Workflow to lint for PHP syntax errors
    • [x] Workflow to check for PHP version compatibility
    • [x] Workflow to check for style violations
    • [x] Workflow to do security checks
    • [ ] ~~Workflow to run PHPUnit tests~~ see #81
  • php-solid-auth

    • [x] Workflow to lint for PHP syntax errors
    • [x] Workflow to check for PHP version compatibility
    • [ ] Workflow to check for style violations
    • [x] Workflow to do security checks
    • [x] Workflow to run PHPUnit tests
  • php-solid-crud

    • [x] Workflow to lint for PHP syntax errors
    • [x] Workflow to check for PHP version compatibility
    • [ ] Workflow to check for style violations
    • [x] Workflow to do security checks
    • [x] Workflow to run PHPUnit tests
  • flysystem-nextcloud

    • [x] Workflow to lint for PHP syntax errors
    • [x] Workflow to check for PHP version compatibility
    • [ ] Workflow to check for style violations
    • [x] Workflow to do security checks
    • [x] Workflow to run PHPUnit tests
  • flysystem-rdf

    • [x] Workflow to lint for PHP syntax errors
    • [x] Workflow to check for PHP version compatibility
    • [ ] Workflow to check for style violations
    • [x] Workflow to do security checks
    • [x] Workflow to run PHPUnit tests

If so desired, this list can be broken out into separate tickets in each repo.

Potherca avatar Jan 02 '22 11:01 Potherca

PRs for linting PHP:

https://github.com/pdsinterop/php-solid-crud/pull/17 https://github.com/pdsinterop/php-solid-auth/pull/21 https://github.com/pdsinterop/flysystem-nextcloud/pull/6 https://github.com/pdsinterop/flysystem-rdf/pull/8

ylebre avatar Aug 26 '22 12:08 ylebre

PRs for PHP version sniff:

https://github.com/pdsinterop/php-solid-auth/pull/22 https://github.com/pdsinterop/php-solid-crud/pull/18 https://github.com/pdsinterop/flysystem-nextcloud/pull/7 https://github.com/pdsinterop/flysystem-rdf/pull/9

ylebre avatar Aug 26 '22 12:08 ylebre

Since the security check only validates dependancies, we are only adding it to the solid-nextcloud repo:

https://github.com/pdsinterop/solid-nextcloud/pull/79

ylebre avatar Aug 26 '22 12:08 ylebre

Above PRs are merged.

ylebre avatar Aug 26 '22 13:08 ylebre

Adding PHP version sniff for solid-nextcloud: https://github.com/pdsinterop/solid-nextcloud/pull/80

ylebre avatar Aug 26 '22 13:08 ylebre

Above PR is merged.

ylebre avatar Aug 26 '22 13:08 ylebre

PHPunit for flysystem/nextcloud: https://github.com/pdsinterop/flysystem-nextcloud/pull/9

ylebre avatar Aug 26 '22 13:08 ylebre

PHPUnit for php-solid-crud: https://github.com/pdsinterop/php-solid-crud/pull/20

ylebre avatar Aug 26 '22 13:08 ylebre

PHPunit for php-solid-auth: https://github.com/pdsinterop/php-solid-auth/pull/24

ylebre avatar Aug 26 '22 14:08 ylebre

PHP Code standard added in 3aa3097c5eb866b823818402a6d6fdcc3222402b and b801021884426e2e299ed2fefe9171354e6caae8

Potherca avatar Jan 20 '24 10:01 Potherca