pactflow / example-provider-dotnet

.NET provider example
MIT License
4 stars 25 forks source link

Example Provider Dotnet

Build

Can I Deploy

Pact Status (latest)

Pact Status (prod)

This is an example of a .NET 8 provider that uses Pact, PactFlow and GitHub Actions to ensure that it is compatible with the expectations its consumers have of it.

The project uses a Makefile to simulate a very simple build pipeline with two stages - test and deploy.

The latest version of the Example Consumer/Example Provider pact is published here.

Project Phases

The project uses a Makefile to simulate a very simple build pipeline with two stages - test and deploy.

Dependencies

Usage

See the PactFlow CI/CD Workshop.

The below commands are designed for a Linux/OSX environment, please translate for use on Windows/PowerShell as necessary:

Please ensure the following environment variables have been exported in the process that you run the tests (generally a terminal):

export PACT_BROKER_TOKEN=<your pactflow read/write token here>
export PACT_BROKER_BASE_URL=https://<your pactflow subdomain>.pactflow.io

Simulating CI

Usually, you would integrate this into a real CI system (such as Buildkite/Jenkins/CircleCI etc., or Travis as this repository is built against).

You can simulate a CI process with the following command:

make fake_ci