{"id":22772338,"url":"https://github.com/pactflow/example-consumer-dotnet","last_synced_at":"2025-04-15T06:48:25.227Z","repository":{"id":42447502,"uuid":"288359544","full_name":"pactflow/example-consumer-dotnet","owner":"pactflow","description":".NET example consumer","archived":false,"fork":false,"pushed_at":"2025-04-01T17:10:31.000Z","size":42,"stargazers_count":6,"open_issues_count":1,"forks_count":25,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-15T06:48:19.880Z","etag":null,"topics":["example"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/pactflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-18T05:04:08.000Z","updated_at":"2025-04-01T17:10:34.000Z","dependencies_parsed_at":"2025-02-17T21:38:25.196Z","dependency_job_id":null,"html_url":"https://github.com/pactflow/example-consumer-dotnet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-consumer-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-consumer-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-consumer-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-consumer-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pactflow","download_url":"https://codeload.github.com/pactflow/example-consumer-dotnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023708,"owners_count":21199958,"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":["example"],"created_at":"2024-12-11T17:08:11.115Z","updated_at":"2025-04-15T06:48:25.212Z","avatar_url":"https://github.com/pactflow.png","language":"C#","readme":"# Example Consumer\n\n[![Build](https://github.com/pactflow/example-consumer-dotnet/actions/workflows/build.yml/badge.svg)](https://github.com/pactflow/example-consumer-dotnet/actions/workflows/build.yml)\n\n![Can I Deploy](https://testdemo.pactflow.io/pacticipants/pactflow-example-consumer-dotnet/branches/master/latest-version/can-i-deploy/to-environment/production/badge)\n\n![Pact Status](https://testdemo.pactflow.io/pacts/provider/pactflow-example-provider-dotnet/consumer/pactflow-example-consumer-dotnet/latest/badge?label=provider) (latest pact)\n\nThis is an example of a dotnet core consumer using Pact to create a consumer driven contract, and sharing it via [PactFlow](https://pactflow.io).\n\nIt is using a private tenant on PactFlow. The latest version of the Example Consumer/Example Provider pact is published [here](https://testdemo.pactflow.io/pacts/provider/pactflow-example-provider-dotnet/consumer/pactflow-example-consumer-dotnet/latest).\n\nThe project uses a Makefile to simulate a very simple build pipeline with two stages - test and deploy.\n\n* Test\n  * Run tests (including the pact tests that generate the contract)\n  * Publish pacts, tagging the consumer version with the name of the current branch\n  * Check if we are safe to deploy to prod (ie. has the pact content been successfully verified)\n* Deploy (only from master)\n  * Deploy app (just pretend for the purposes of this example!)\n  * Tag the deployed consumer version as 'prod'\n\n## Dependencies\n\n* Docker\n* A [PactFlow](https://pactflow.io) account \n* A [read/write API Token](https://docs.pactflow.io/#configuring-your-api-token) from your PactFlow account\n* .NET 8.x installed. You can install it from here: https://docs.microsoft.com/en-us/dotnet/core/install\n\n## Usage\n\nSee the [PactFlow CI/CD Workshop](https://github.com/pactflow/ci-cd-workshop).\n\nThe below commands are designed for a Linux/OSX environment, please translate for use on Windows/PowerShell as necessary:\n\nPlease ensure the following environment variables have been exported in the process that you run the tests (generally a terminal):\n\n```\nexport PACT_BROKER_TOKEN=\u003cyour pactflow read/write token here\u003e\nexport PACT_BROKER_BASE_URL=https://\u003cyour pactflow subdomain\u003e.pactflow.io\n```\n\n### Run tests\n\n```\nmake restore\nmake test\n```\n\n### Simulating CI\n\nUsually, you would integrate this into a real CI system (such as Buildkite/Jenkins/CircleCI etc., or Travis as this repository is built against).\n\nYou can simulate a CI process with the following command:\n\n```\nmake fake_ci\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpactflow%2Fexample-consumer-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpactflow%2Fexample-consumer-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpactflow%2Fexample-consumer-dotnet/lists"}