mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Improve documentation
This commit is contained in:
parent
46ac6f2211
commit
06e916db9d
6
.github/CONTRIBUTING.md
vendored
6
.github/CONTRIBUTING.md
vendored
@ -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
|
||||
@ -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
.github/PULL_REQUEST_TEMPLATE.md
vendored
9
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -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.
|
||||
|
30
.github/PULL_REQUEST_TEMPLATE/FAILING_TEST.md
vendored
30
.github/PULL_REQUEST_TEMPLATE/FAILING_TEST.md
vendored
@ -1,30 +0,0 @@
|
||||
---
|
||||
name: 🐞 Failing Test
|
||||
about: You found a bug and have a failing test?
|
||||
labels: bug
|
||||
---
|
||||
|
||||
## A Pull Request should be associated with an Issue.
|
||||
|
||||
> We wish to have discussions in Issues. A single issue may be targeted by multiple PRs.
|
||||
> If you're offering a new feature or fixing anything, we'd like to know beforehand in Issues,
|
||||
> and potentially we'll be able to point development in a particular direction.
|
||||
|
||||
Related issue:
|
||||
|
||||
> Further notes in [Contribution Guidelines](.github/CONTRIBUTING.md)
|
||||
> Thank you! We are open to PRs, but please understand if for technical reasons we are unable to accept each and any PR
|
||||
|
||||
### Description
|
||||
|
||||
This PR [briefly explain what it does]
|
||||
|
||||
> In case this PR introduced TypeScript/JavaScript code changes:
|
||||
|
||||
- [ ] I have written test cases for the changes in this pull request
|
||||
- [ ] I have run `npm run format` before the commit.
|
||||
- [ ] `npm test` returns with no unit test errors.
|
||||
|
||||
<!--
|
||||
- Please target the develop branch when submitting the pull request.
|
||||
-->
|
1
.github/PULL_REQUEST_TEMPLATE/FIX.md
vendored
1
.github/PULL_REQUEST_TEMPLATE/FIX.md
vendored
@ -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.
|
||||
|
1
.github/PULL_REQUEST_TEMPLATE/IMPROVEMENT.md
vendored
1
.github/PULL_REQUEST_TEMPLATE/IMPROVEMENT.md
vendored
@ -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.
|
||||
|
1
.github/PULL_REQUEST_TEMPLATE/NEW_FEATURE.md
vendored
1
.github/PULL_REQUEST_TEMPLATE/NEW_FEATURE.md
vendored
@ -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.
|
||||
|
52
README.md
52
README.md
@ -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|
|
||||
@ -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.
|
||||
|
||||
|
||||
@ -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
|
||||
@ -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.
|
||||
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user