Skip to content

Commit 78e27b9

Browse files
updated example, lint fixes
1 parent b8263d6 commit 78e27b9

File tree

1 file changed

+21
-27
lines changed

1 file changed

+21
-27
lines changed

README.md

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,17 @@
66

77
**[GitHub Action](https://github.com/features/actions) that installs [Hoverfly](https://docs.hoverfly.io/), so that it can be used in subsequent steps in your GitHub Actions CI/CD pipeline (e.g. when running tests that use Hoverfly).**
88

9-
109
## Using the Hoverfly action
1110

1211
Using this action is as simple as:
1312

1413
1. **create a `.github\workflows` directory** in your repository
15-
2. **create a
16-
[YAML](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows)
17-
file** in the `.github\workflows` directory (file name can be anything you like,
14+
2. **create a
15+
[YAML](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows)
16+
file** in the `.github\workflows` directory (file name can be anything you like,
1817
with either a `.yml` or `.yaml` file extension), with this content:
19-
20-
```
18+
19+
```yml
2120
---
2221
name: Hoverfly
2322
on:
@@ -30,15 +29,16 @@ jobs:
3029
runs-on: ubuntu-latest
3130
steps:
3231
- name: Install Hoverfly
33-
uses: agilepathway/hoverfly-github-action@main
32+
uses: SpectoLabs/hoverfly-github-action@main
3433
with:
34+
version: v1.10.12
3535
runner_github_workspace_path: ${{ github.workspace }}
3636
```
3737
3838
You will also typically have additional steps both before and after the Hoverfly installation step,
3939
e.g. to checkout your code and to run your tests. Here's an example:
4040
41-
```
41+
```yml
4242
---
4343
name: Run tests
4444
on:
@@ -55,24 +55,25 @@ jobs:
5555
- name: Install Hoverfly
5656
uses: agilepathway/hoverfly-github-action@main
5757
with:
58+
version: v1.10.12
5859
runner_github_workspace_path: ${{ github.workspace }}
5960
- name: Run Tests
6061
run: <command-to-run-your-tests>
6162
```
6263
63-
Once the Hoverfly installation has completed, both the
64-
[Hoverfly](https://docs.hoverfly.io/en/latest/pages/reference/hoverfly/hoverflycommands.html) and
65-
[Hoverctl](https://docs.hoverfly.io/en/latest/pages/keyconcepts/hoverctl.html)
64+
Once the Hoverfly installation has completed, both the
65+
[Hoverfly](https://docs.hoverfly.io/en/latest/pages/reference/hoverfly/hoverflycommands.html) and
66+
[Hoverctl](https://docs.hoverfly.io/en/latest/pages/keyconcepts/hoverctl.html)
6667
commands are available to you for the remainder of your GitHub Actions workflow:
68+
6769
- `hoverfly`
6870
- `hoverctl`
6971

70-
7172
## Specifying the Hoverfly version
7273

7374
Example:
7475

75-
```
76+
```yml
7677
steps:
7778
- name: Install Hoverfly
7879
uses: agilepathway/hoverfly-github-action@main
@@ -82,10 +83,9 @@ Example:
8283
```
8384

8485
`version` can be any [released Hoverfly version](https://github.com/SpectoLabs/hoverfly/releases).
85-
If you do not provide a version, it will default to the
86+
If you do not provide a version, it will default to the
8687
[latest](https://github.com/SpectoLabs/hoverfly/releases/latest) release.
8788

88-
8989
## Runner GitHub Workspace path and Hoverfly installation location
9090

9191
As per the above examples, you have to provide the following parameter:
@@ -100,12 +100,11 @@ The Hoverfly binaries are installed at `${{ github.workspace }}/bin`
100100

101101
(The [GitHub workspace directory is persistent throughout the GitHub Action workflow](https://docs.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#filesystems-on-github-hosted-runners), which means that the binaries are available to any subsequent workflow steps.)
102102

103-
104103
## Enabling HTTPS Hoverfly simulations
105104

106105
To enable [HTTPS Hoverfly simulations](https://docs.hoverfly.io/en/latest/pages/tutorials/basic/https/https.html), follow this example:
107106

108-
```
107+
```yml
109108
steps:
110109
- name: Install Hoverfly
111110
uses: agilepathway/hoverfly-github-action@main
@@ -115,33 +114,28 @@ To enable [HTTPS Hoverfly simulations](https://docs.hoverfly.io/en/latest/pages/
115114
run: install-and-trust-hoverfly-default-cert.sh
116115
```
117116

118-
This script
117+
This script
119118
[installs and trusts the default Hoverfly certificate](https://docs.hoverfly.io/en/latest/pages/tutorials/advanced/configuressl/configuressl.html),
120-
after which you can go ahead and simulate HTTPS calls (see
121-
[this example](https://github.com/agilepathway/hoverfly-github-action/blob/a0a08dae5c28d0980205c7997ce4accc20d1fc48/.github/workflows/tests.yml#L95-L113)
119+
after which you can go ahead and simulate HTTPS calls (see
120+
[this example](https://github.com/agilepathway/hoverfly-github-action/blob/a0a08dae5c28d0980205c7997ce4accc20d1fc48/.github/workflows/tests.yml#L95-L113)
122121
in the [end-to-end tests](.github/workflows/tests.yml)).
123122

124123
Our Hoverfly GitHub Action automatically makes this https cert
125124
[install script](./install-and-trust-hoverfly-default-cert.sh) available
126125
(in the same `${{ github.workspace }}/bin` directory which we add to the path and which the
127126
Hoverfly binaries are located in too).
128127

129-
130-
131-
132128
## Tests / examples
133129

134130
The [tests](.github/workflows/tests.yml) contain further configuration examples.
135131

136-
137132
## Suggestions / bug reports / contributions
138133

139134
The project is [open source](https://opensource.guide/how-to-contribute/) and all contributions are very welcome :slightly_smiling_face: :boom: :thumbsup:
140135

141-
* [How to report a bug or suggest a new feature](CONTRIBUTING.md#how-to-report-a-bug-or-suggest-a-new-feature)
142-
143-
* [How to make a contribution](CONTRIBUTING.md#how-to-make-a-contribution)
136+
- [How to report a bug or suggest a new feature](CONTRIBUTING.md#how-to-report-a-bug-or-suggest-a-new-feature)
144137

138+
- [How to make a contribution](CONTRIBUTING.md#how-to-make-a-contribution)
145139

146140
## Updating dependencies
147141

0 commit comments

Comments
 (0)