Skip to content

Commit 8a6714b

Browse files
author
Greg Bowler
committed
docs: document repository
1 parent 493a8ab commit 8a6714b

2 files changed

Lines changed: 82 additions & 2 deletions

File tree

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# These are supported funding model platforms
2+
github: [g105b]

README.md

Lines changed: 80 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,87 @@
33
Run your Behat tests in your Github Actions.
44
============================================
55

6-
Behat is an open source Behavior Driven Development framework for PHP 5.3+. What’s behavior driven development, you ask? It’s a way to develop software through a constant communication with stakeholders in form of examples; examples of how this software should help them, and you, to achieve your goals.
6+
Behat is an open source Behavior Driven Development framework. What’s behavior driven development, you ask? It's a way to develop software through a constant communication with stakeholders in form of examples; examples of how this software should help them, and you, to achieve your goals.
7+
8+
> Given I am on "https://github.com/php-actions/behat"
9+
> When I press "Star this repository"
10+
> Then I should be a stargazer of "php-actions/behat"
11+
> And I should see "Unstar this repository"
712
813
Usage
914
-----
1015

11-
// TODO: WIP
16+
Create your Github Workflow configuration in `.github/workflows/ci.yml` or similar.
17+
18+
```yml
19+
name: CI
20+
21+
on: [push]
22+
23+
jobs:
24+
build-test:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- uses: actions/checkout@v3
29+
- uses: php-actions/composer@v3
30+
- uses: php-actions/behat@v1
31+
# ... then your own project steps ...
32+
```
33+
34+
### Version numbers
35+
36+
This action is released with semantic version numbers, but also tagged to the latest major release's tag always points to the latest release within the matching major version.
37+
38+
Please feel free to use `uses: php-actions/behat@v1` to always run the latest version of v1, or `uses: php-actions/behat@v1.0.1` to specify an exact release.
39+
40+
Example
41+
-------
42+
43+
We've put together an extremely simple example application that uses `php-actions/behat`. Check it out here: https://github.com/php-actions/example-behat.
44+
45+
Inputs
46+
------
47+
48+
The following configuration options are available:
49+
50+
+ ???
51+
52+
The syntax for passing in custom input is the following:
53+
54+
```yml
55+
...
56+
jobs:
57+
behat:
58+
59+
...
60+
61+
- name: Behat tests
62+
uses: php-actions/behat@v1
63+
with:
64+
config: path/to/behat.yml
65+
memory_limit: 256M
66+
```
67+
68+
If you require other configurations of Behat, please request them in the [GitHub issue tracker][issues].
69+
70+
PHP and Behat versions
71+
----------------------
72+
73+
It's possible to run any version of Behaty under any version of PHP, with any PHP extensions you require. This is configured with the following inputs:
74+
75+
+ `version` - the version number of Behat to run, e.g. `3` or `3.11.0` (default: latest)
76+
+ `php_version` - the version number of PHP to use, e.g. `7.4` (default: latest)
77+
+ `php_extensions` - a space-separated list of extensions to install using [php-build][php-build], e.g. `xdebug mbstring` (default: N/A)
78+
79+
Please note the version number specified within your Action configuration must match your `composer.json` major version number. For example, if your composer.json requires `behat/behat 3.11.0`, you must use the version: `3.11.0` input, as major versions of PHPBehat are incompatible with each other.
80+
81+
If you require a specific version that is not compatible with GitHub Actions for some reason, please make a request in the [GitHub issue tracker][issues].
82+
83+
***
84+
85+
If you found this repository helpful, please consider [sponsoring the developer][sponsor].
86+
87+
[issues]: https://github.com/php-actions/behat/issues
88+
[php-build]: https://github.com/php-actions/php-build
89+
[sponsor]: https://github.com/sponsors/g105b

0 commit comments

Comments
 (0)