Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Nov 3, 2019
1 parent 46ac6f2 commit 06e916d
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 44 deletions.
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Please note that this project is released with a [Contributor Code of Conduct](C

Please make sure that you have [set up your user name and email address](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) for use with Git. Strings such as `silly nick name <root@localhost>` look really stupid in the commit history of a project.

Due to time constraints, you may not always get a quick responce. Please do not take delays personal and feel free to remind me.
Due to time constraints, you may not always get a quick response. Please do not take delays personal and feel free to remind.

## Coding Guidelines

This project comes with a `.prettierrc.json` configuration file. Please run the following command to format the code before commiting it.
This project comes with a `.prettierrc.json` configuration file. Please run the following command to format the code before committing it.

```bash
$ npm run format
Expand Down Expand Up @@ -49,6 +49,6 @@ $ npm test

## Reporting issues

Please submit the issue using the appropiate template provided for a bug report or a feature request:
Please submit the issue using the appropriate template provided for a bug report or a feature request:

* [Issues](https://github.com/shivammathur/setup-php/issues)
9 changes: 3 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
name: |
🐞 Failing Test
🐞 Bug Fix
⚙ Improvement
🎉 New Feature
about: You found a bug, have a failing test, want to improve something or add a new feature
name: 🐞 Bug Fix, ⚙ Improvement or 🎉 New Feature
about: You found a bug, want to improve something or add a new feature
labels: bug or enhancement

---

## A Pull Request should be associated with an Issue.
Expand Down
30 changes: 0 additions & 30 deletions .github/PULL_REQUEST_TEMPLATE/FAILING_TEST.md

This file was deleted.

1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE/FIX.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: 🐞 Bug Fix
about: You have a fix for a bug?
labels: bug

---

## A Pull Request should be associated with an Issue.
Expand Down
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE/IMPROVEMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: ⚙ Improvement
about: You have some improvement to make setup-php better?
labels: enhancement

---

## A Pull Request should be associated with an Issue.
Expand Down
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE/NEW_FEATURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: 🎉 New Feature
about: You have implemented some neat idea that you want to make part of setup-php?
labels: enhancement

---

## A Pull Request should be associated with an Issue.
Expand Down
52 changes: 47 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,26 @@

Setup PHP with required extensions, php.ini configuration and composer in [GitHub Actions](https://github.com/features/actions "GitHub Actions"). This action can be added as a step in your action workflow and it will setup the PHP environment you need to test your application. Refer to [Usage](#memo-usage "How to use this") section and [examples](#examples "Examples of use") to see how to use this.

## Contents

- [PHP Support](#tada-php-support)
- [OS/Platform Support](#cloud-osplatform-support)
- [PHP Extension Support](#wrench-php-extension-support)
- [Coverage support](#signal_strength-coverage-support)
- [Xdebug](#xdebug)
- [PCOV](#pcov)
- [Disable coverage](#disable-coverage)
- [Usage](#memo-usage)
- [Basic Usage](#basic-usage)
- [Matrix Testing](#matrix-testing)
- [Cache dependencies](#cache-dependencies)
- [Examples](#examples)
- [License](#scroll-license)
- [Contributions](#1-contributions)
- [Support this project](#sparkling_heart-support-this-project)
- [This action uses the following works](#bookmark-this-action-uses-the-following-works)
- [Further Reading](#bookmark_tabs-further-reading)

## :tada: PHP Support

|PHP Version|Stability|Release Support|
Expand Down Expand Up @@ -64,7 +84,7 @@ with:
Specify `coverage: pcov` to use `PCOV`.
It is much faster than `Xdebug`.
`PCOV` needs `PHP >= 7.1`
`PCOV` needs `PHP >= 7.1`.
If your source code directory is other than `src`, `lib` or, `app`, specify `pcov.directory` using the `ini-values-csv` input.


Expand All @@ -80,9 +100,10 @@ with:

Specify `coverage: none` to disable both `Xdebug` and `PCOV`.
Consider disabling the coverage using this PHP action for these reasons.

- You are not generating coverage reports while testing.
- It will disable `Xdebug`, which will have a positive impact on PHP performance.
- You are using `phpdbg`.
- You are using `phpdbg` for running your tests.

```yaml
uses: shivammathur/setup-php@master
Expand Down Expand Up @@ -153,6 +174,24 @@ jobs:
run: php -m
```

### Cache dependencies

You can cache you dependencies using the [`action/cache`](https://github.com/actions/cache) GitHub Action and add a condition in your `composer install` step to run only if your dependencies are not cached. The files cached using this method are available across check-runs and will reduce the workflow execution time.

```yaml
- name: Cache dependencies
- uses: actions/cache@preview
id: cache
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: composer install
```

### Examples

Examples for setting up this GitHub Action with different PHP Frameworks/Packages.
Expand Down Expand Up @@ -181,12 +220,15 @@ The scripts and documentation in this project are released under the [MIT Licens

## :+1: Contributions

Contributions are welcome! See [Contributor's Guide](.github/CONTRIBUTING.md "shivammathur/setup-php contribution guide").
Contributions are welcome! See [Contributor's Guide](.github/CONTRIBUTING.md "shivammathur/setup-php contribution guide"). If you face any issues while using this or want to suggest a feature/improvement, create an issue [here](https://github.com/shivammathur/setup-php/issues "Issues reported").

## :sparkling_heart: Support this project

- Please star the project and share it.
- Please support on <a href="https://www.patreon.com/shivammathur"><img alt="Support me on Patreon" src="https://shivammathur.com/badges/patreon.svg"></a> and <a href="https://www.paypal.me/shivammathur"><img alt="Support me on Paypal" src="https://shivammathur.com/badges/paypal.svg"></a>.
If this action helped you.

- Please star the project and share it, this helps reach more people.
- If you blog, write about your experience using this.
- Support on this project on <a href="https://www.patreon.com/shivammathur"><img alt="Patreon" src="https://shivammathur.com/badges/patreon.svg"></a> or using <a href="https://www.paypal.me/shivammathur"><img alt="Paypal" src="https://shivammathur.com/badges/paypal.svg"></a>.

## :bookmark: This action uses the following works

Expand Down

0 comments on commit 06e916d

Please sign in to comment.