php-ovh icon indicating copy to clipboard operation
php-ovh copied to clipboard

Adding Github actions, codecov config, updating tests accordingly and re-organize README file

Open carsso opened this issue 3 years ago • 0 comments

Backported from https://github.com/carsso/php-ovhcloud

This PR includes many things among :

  • Build is using GitHub actions for PHP versions 7.4, 8.0, 8.1 (old travis build config has been removed)
  • Code linting (inclued in build checks)
  • Updated and uniformized configuration files for tests, documentation and linter (everything can be executed easily through a composer command)
  • Updated functional tests (mainly to fix infinite test data persisted in OVHcloud account when tests are interrupted)
  • New README file organization

Known limitation discovered in functional tests, not fixed but partially workarounded in GitHub actions config : functional tests cannot not be parallelized because they are changing a real OVHcloud account configuration while being executed.

You will need to enable/setup codecov on this repo here https://app.codecov.io/gh/ovh/php-ovh You don't need to put the codecov token anywhere, codecov will bind directly using github api.

You will also need to create a few secrets in your github actions config :

  • OVH_TESTS_APP_KEY
  • OVH_TESTS_APP_SECRET
  • OVH_TESTS_CONSUMER_KEY
  • OVH_TESTS_ENDPOINT

To fill these secrets, generate an unlimited token from the OVHcloud API (I highly recommend to use an empty account dedicated to tests).

Needed rights :

[
  {
    method: "GET",
    path: "/*"
  },
  {
    method: "POST",
    path: "/me/accessRestriction/*"
  },
  {
    method: "PUT",
    path: "/me/accessRestriction/*"
  },
  {
    method: "DELETE",
    path: "/me/accessRestriction/*"
  }
]

carsso avatar Aug 03 '22 19:08 carsso