{"id":20915101,"url":"https://github.com/microcks/test-github-action","last_synced_at":"2025-07-29T04:02:06.025Z","repository":{"id":65160894,"uuid":"327885059","full_name":"microcks/test-github-action","owner":"microcks","description":"GitHub Action for launching a Microcks test","archived":false,"fork":false,"pushed_at":"2025-07-03T08:56:49.000Z","size":545,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-21T18:52:09.089Z","etag":null,"topics":["api","contract-testing","github-actions","microcks","testing"],"latest_commit_sha":null,"homepage":"https://microcks.io","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microcks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY-INSIGHTS.yml","support":null,"governance":"GOVERNANCE.md","roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"microcks","patreon":null,"open_collective":"microcks","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-01-08T11:33:43.000Z","updated_at":"2025-07-03T08:56:47.000Z","dependencies_parsed_at":"2024-11-08T00:22:58.094Z","dependency_job_id":"784b050e-6adc-49df-986e-2c92fdfd8d69","html_url":"https://github.com/microcks/test-github-action","commit_stats":{"total_commits":21,"total_committers":3,"mean_commits":7.0,"dds":"0.33333333333333337","last_synced_commit":"d888784804a4c7d8d627450a63c6fc3dae1cc0a4"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/microcks/test-github-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcks%2Ftest-github-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcks%2Ftest-github-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcks%2Ftest-github-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcks%2Ftest-github-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microcks","download_url":"https://codeload.github.com/microcks/test-github-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcks%2Ftest-github-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267123590,"owners_count":24039458,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","contract-testing","github-actions","microcks","testing"],"created_at":"2024-11-18T16:13:01.655Z","updated_at":"2025-07-29T04:02:05.600Z","avatar_url":"https://github.com/microcks.png","language":null,"readme":"## GitHub Action for launching a Microcks test\n\nThis is a GitHub Action you may use in your Workflow to launch a Microcks test on a deployed API endpoint. Microcks tests allow you to validate an API endpoint against its OpenAPI specification, AsyncAPI specification or Postman collection definition. If test succeeds (ie. API endpoint is compliant with API contract) the workflow is pursuing, if not it fails. This action is basically a wrapper around the [Microcks CLI](https://github.com/microcks/microcks-cli) and provides the same configuration capabilities.\n\n[![License](https://img.shields.io/github/license/microcks/microcks-cli?style=for-the-badge\u0026logo=apache)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Project Chat](https://img.shields.io/badge/discord-microcks-pink.svg?color=7289da\u0026style=for-the-badge\u0026logo=discord)](https://microcks.io/discord-invite/)\n[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/microcks-cli-image\u0026style=for-the-badge)](https://artifacthub.io/packages/search?repo=microcks-cli-image)\n[![CNCF Landscape](https://img.shields.io/badge/CNCF%20Landscape-5699C6?style=for-the-badge\u0026logo=cncf)](https://landscape.cncf.io/?item=app-definition-and-development--application-definition-image-build--microcks)\n\n### Build Status\n\n#### Fossa license and security scans\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmicrocks%2Ftest-github-action.svg?type=shield\u0026issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Ftest-github-action?ref=badge_shield\u0026issueType=license)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmicrocks%2Ftest-github-action.svg?type=shield\u0026issueType=security)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Ftest-github-action?ref=badge_shield\u0026issueType=security)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmicrocks%2Ftest-github-action.svg?type=small)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Ftest-github-action?ref=badge_small)\n\n#### OpenSSF best practices on Microcks core\n\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/7513/badge)](https://bestpractices.coreinfrastructure.org/projects/7513)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/microcks/microcks/badge)](https://securityscorecards.dev/viewer/?uri=github.com/microcks/microcks)\n\n## Community\n\n* [Documentation](https://microcks.io/documentation/tutorials/getting-started/)\n* [Microcks Community](https://github.com/microcks/community) and community meeting\n* Join us on [Discord](https://microcks.io/discord-invite/), on [GitHub Discussions](https://github.com/orgs/microcks/discussions) or [CNCF Slack #microcks channel](https://cloud-native.slack.com/archives/C05BYHW1TNJ)\n\nTo get involved with our community, please make sure you are familiar with the project's [Code of Conduct](./CODE_OF_CONDUCT.md).\n\n## What it needs?\n\nThe `test` action needs 3 arguments:\n\n* `\u003capiName:apiVersion\u003e` : Service to test reference. Exemple: `'Beer Catalog API:0.9'`\n* `\u003ctestEndpoint\u003e` : URL where is deployed implementation to test\n* `\u003crunner\u003e` : Test strategy (one of: `HTTP`, `SOAP`, `SOAP_UI`, `POSTMAN`, `OPEN_API_SCHEMA`, `ASYNC_API_SCHEMA`, `GRPC_PROTOBUF`, `GRAPHQL_SCHEMA`)\n\nWith a bunch of mandatory flags:\n\n* `--microcksURL` for the Microcks API endpoint,\n* `--keycloakClientId` for the Keycloak Realm Service Account ClientId,\n* `--keycloakClientSecret` for the Keycloak Realm Service Account ClientSecret.\n\nAnd some optional ones:\n\n* `--waitFor` for the time to wait for test to finish (int + one of: milli, sec, min). Default is `5sec`,\n* `--secretName='\u003cSecret Name\u003e'` is an optional flag specifying the name of a Secret to use for connecting endpoint,\n* `--filteredOperations=\u003cJSON\u003e` allows to filter a list of operations to launch a test for,\n* `--operationsHeaders=\u003cJSON\u003e` allows to override some operations headers for the tests to launch.\n\n## How to use it?\n\nObviously we can find this action with [GitHub Actions Marketplace](https://github.com/marketplace?type=actions) :wink:\n\nYou may add the Action to your Workflow directly from the GitHub UI.\n\n![marketplace](./assets/marketplace.png)\n\n### Step 1 - Configure the GitHub action\n\n```yaml\nname: my-workflow\non: [push]\njobs:\n  my-job:\n    runs-on: ubuntu-latest\n    environment: Development\n    steps:\n      - uses: microcks/test-github-action@v1\n        with:\n          apiNameAndVersion: 'API Pastry - 2.0:2.0.0'\n          testEndpoint: 'http://my-api-pastry.apps.cluster.example.com'\n          runner: OPEN_API_SCHEMA\n          microcksURL: 'https://microcks.apps.acme.com/api/'\n          keycloakClientId:  ${{ secrets.MICROCKS_SERVICE_ACCOUNT }}\n          keycloakClientSecret:  ${{ secrets.MICROCKS_SERVICE_ACCOUNT_CREDENTIALS }}\n          waitFor: '10sec'\n```\n\n### Step 2 - Configure the Secrets\n\nAs you probably saw just above, we do think it's a best practice to use GitHub Secrets (general or tied to `Environment` like in the example) to hold the Keycloak credentials (client Id and Secret). See below the Secrets configuration we've used for the example:\n\n![secret configuration](./assets/secrets.png)\n","funding_links":["https://github.com/sponsors/microcks","https://opencollective.com/microcks"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrocks%2Ftest-github-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrocks%2Ftest-github-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrocks%2Ftest-github-action/lists"}