{"id":19940839,"url":"https://github.com/spectolabs/hoverfly-github-action","last_synced_at":"2025-03-01T13:14:23.931Z","repository":{"id":37012676,"uuid":"283365071","full_name":"SpectoLabs/hoverfly-github-action","owner":"SpectoLabs","description":"Install Hoverfly (https://docs.hoverfly.io) so that other GitHub Actions can use it easily (e.g. for testing)","archived":false,"fork":false,"pushed_at":"2022-10-23T08:37:06.000Z","size":81,"stargazers_count":3,"open_issues_count":7,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-14T12:54:23.250Z","etag":null,"topics":["api-simulation","github-actions","hoverfly","http","https","mitm","mocking","proxy","service-virtualization","stubbing","testing","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpectoLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-29T01:14:31.000Z","updated_at":"2024-01-04T07:39:14.000Z","dependencies_parsed_at":"2023-01-04T12:14:58.347Z","dependency_job_id":null,"html_url":"https://github.com/SpectoLabs/hoverfly-github-action","commit_stats":null,"previous_names":[],"tags_count":59,"template":false,"template_full_name":"actions/container-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectoLabs%2Fhoverfly-github-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectoLabs%2Fhoverfly-github-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectoLabs%2Fhoverfly-github-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectoLabs%2Fhoverfly-github-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpectoLabs","download_url":"https://codeload.github.com/SpectoLabs/hoverfly-github-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241367932,"owners_count":19951449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-simulation","github-actions","hoverfly","http","https","mitm","mocking","proxy","service-virtualization","stubbing","testing","testing-tools"],"created_at":"2024-11-13T00:07:09.112Z","updated_at":"2025-03-01T13:14:23.907Z","avatar_url":"https://github.com/SpectoLabs.png","language":"Shell","readme":"# Hoverfly GitHub Action\n\n[![tests](https://github.com/agilepathway/hoverfly-github-action/workflows/Test/badge.svg?branch=main\u0026event=push)](https://github.com/agilepathway/hoverfly-github-action/actions?query=workflow%3ATest+event%3Apush+branch%3Amain)\n[![reviewdog](https://github.com/agilepathway/hoverfly-github-action/workflows/reviewdog/badge.svg?branch=main\u0026event=push)](https://github.com/agilepathway/hoverfly-github-action/actions?query=workflow%3Areviewdog+event%3Apush+branch%3Amain)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg?maxAge=43200)](LICENSE)\n\n**[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).**\n\n\n## Using the Hoverfly action\n\nUsing this action is as simple as:\n\n1. **create a `.github\\workflows` directory** in your repository\n2. **create a \n   [YAML](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows) \n   file** in the `.github\\workflows` directory (file name can be anything you like, \n   with either a `.yml` or `.yaml` file extension), with this content:\n \n```\n---\nname: Hoverfly\non:\n  push:\n\njobs:\n\n  install-hoverfly:\n  name: Install\n  runs-on: ubuntu-latest\n  steps:\n    - name: Install Hoverfly\n      uses: agilepathway/hoverfly-github-action@main\n      with:\n        runner_github_workspace_path: ${{ github.workspace }}\n```\n\nYou will also typically have additional steps both before and after the Hoverfly installation step,\ne.g. to checkout your code and to run your tests. Here's an example:\n\n```\n---\nname: Run tests\non:\n  push:\n\njobs:\n\n  run-tests:\n  name: Install Hoverfly and run tests\n  runs-on: ubuntu-latest\n  steps:\n    - name: Checkout code\n        uses: actions/checkout@v2\n    - name: Install Hoverfly\n      uses: agilepathway/hoverfly-github-action@main\n      with:\n        runner_github_workspace_path: ${{ github.workspace }}\n    - name: Run Tests\n        run: \u003ccommand-to-run-your-tests\u003e\n```\n\nOnce the Hoverfly installation has completed, both the \n[Hoverfly](https://docs.hoverfly.io/en/latest/pages/reference/hoverfly/hoverflycommands.html) and \n[Hoverctl](https://docs.hoverfly.io/en/latest/pages/keyconcepts/hoverctl.html) \ncommands are available to you for the remainder of your GitHub Actions workflow:\n- `hoverfly`\n- `hoverctl`\n\n\n## Specifying the Hoverfly version\n\nExample:\n\n```\n  steps:\n    - name: Install Hoverfly\n      uses: agilepathway/hoverfly-github-action@main\n      with:\n        version: v1.3.6\n        runner_github_workspace_path: ${{ github.workspace }}\n```\n\n`version` can be any [released Hoverfly version](https://github.com/SpectoLabs/hoverfly/releases).\nIf you do not provide a version, it will default to the \n[latest](https://github.com/SpectoLabs/hoverfly/releases/latest) release.\n\n\n## Runner GitHub Workspace path and Hoverfly installation location\n\nAs per the above examples, you have to provide the following parameter:\n\n`runner_github_workspace_path: ${{ github.workspace }}`\n\nThe value must always be `${{ github.workspace }}`\n\nThis is so that the Hoverfly binaries are added to the path properly.\n\nThe Hoverfly binaries are installed at `${{ github.workspace }}/bin`\n\n(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.)\n\n\n## Enabling HTTPS Hoverfly simulations\n\nTo enable [HTTPS Hoverfly simulations](https://docs.hoverfly.io/en/latest/pages/tutorials/basic/https/https.html), follow this example:\n\n```\n  steps:\n    - name: Install Hoverfly\n      uses: agilepathway/hoverfly-github-action@main\n      with:\n        runner_github_workspace_path: ${{ github.workspace }}\n      - name: Enable https calls to be simulated by Hoverfly\n        run: install-and-trust-hoverfly-default-cert.sh\n```\n\nThis script \n[installs and trusts the default Hoverfly certificate](https://docs.hoverfly.io/en/latest/pages/tutorials/advanced/configuressl/configuressl.html),\nafter which you can go ahead and simulate HTTPS calls (see \n[this example](https://github.com/agilepathway/hoverfly-github-action/blob/a0a08dae5c28d0980205c7997ce4accc20d1fc48/.github/workflows/tests.yml#L95-L113) \nin the [end-to-end tests](.github/workflows/tests.yml)).\n\nOur Hoverfly GitHub Action automatically makes this https cert\n[install script](./install-and-trust-hoverfly-default-cert.sh) available\n(in the same `${{ github.workspace }}/bin` directory which we add to the path and which the\nHoverfly binaries are located in too).\n\n\n\n\n## Tests / examples\n\nThe [tests](.github/workflows/tests.yml) contain further configuration examples.\n\n\n## Suggestions / bug reports / contributions\n\nThe project is [open source](https://opensource.guide/how-to-contribute/) and all contributions are very welcome :slightly_smiling_face: :boom: :thumbsup:\n\n* [How to report a bug or suggest a new feature](CONTRIBUTING.md#how-to-report-a-bug-or-suggest-a-new-feature)\n\n* [How to make a contribution](CONTRIBUTING.md#how-to-make-a-contribution)\n\n\n## Updating dependencies\n\nSee the [DEPENDENCIES.md](.github/DEPENDENCIES.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspectolabs%2Fhoverfly-github-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspectolabs%2Fhoverfly-github-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspectolabs%2Fhoverfly-github-action/lists"}