Download the PHP package mlocati/ci-info without Composer
On this page you can find all versions of the php package mlocati/ci-info. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mlocati/ci-info
More information about mlocati/ci-info
Files in mlocati/ci-info
Package ci-info
Short Description Get informations about the current continuous integration environment
License MIT
Homepage https://github.com/mlocati/ci-info
Informations about the package ci-info
CI-Info
This package lets you get details about the current Continuous Integration environment.
Supported environments are:
- AppVeyor
- GitHub Actions
- TravisCI
Installation
You can install this package in two ways:
-
using composer:
- manually: download a ZIP archive from the project Releases page.
Usage from within your PHP scripts
Setup
First of all, if you don't use Composer, you need to include the autoload.php
file you can find in the root directory of this project:
Usage
Determine the current CI Environment
Get info about the current job
To see the methods available for every class, see the source code.
Usage from a shell
You can also use this library in your shell scripts (bash, sh, powershell, ...).
First of all, you have to determine the path of the ci-info
file. It's under the bin
directory (or composer/vendor/bin
for composer-based projects).
ci-info
can provide details about the current environment/job.
Here's a sample POSIX script:
Here's a sample PowerShell script:
To get the full list of the features of the ci-info
command, type:
Which outputs:
Tests
This library is tested against two types of cases:
- Offline tests, implemented as GitHub Actions and managed by phpunit, which test the library against well-known environment statuses of the supported CI environment
- Online tests, executed directly in every supported CI enviromnent