Skip to content

Commit

Permalink
Merge pull request #35 from SmartBear-DevRel/feat/add_pact
Browse files Browse the repository at this point in the history
Feat/add pact
  • Loading branch information
YOU54F authored Sep 26, 2024
2 parents 5224978 + 5e27aea commit 5ec2fd0
Show file tree
Hide file tree
Showing 9 changed files with 2,622 additions and 4 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/build-test-cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ jobs:
with:
useConfigFile: true
configFilePath: ./.github/gitversion.yml

- uses: pactflow/actions/can-i-deploy@v2
with:
to_environment: production
application_name: explore-cli
broker_url: ${{ secrets.PACT_BROKER_BASE_URL }}
token: ${{ secrets.PACT_BROKER_TOKEN }}
retry_while_unknown: 5
retry_interval: 10
- name: Download artifacts
uses: actions/download-artifact@v4

Expand All @@ -131,4 +140,11 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifact/*
file_glob: true
tag: ${{ steps.gitversion.outputs.MajorMinorPatch }}
tag: ${{ steps.gitversion.outputs.MajorMinorPatch }}

- uses: pactflow/actions/record-release@v2
with:
environment: production
application_name: explore-cli
broker_url: ${{ secrets.PACT_BROKER_BASE_URL }}
token: ${{ secrets.PACT_BROKER_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/build-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ jobs:
dotnet test
working-directory: test/Explore.Cli.Tests

- uses: pactflow/actions/publish-pact-files@v2
with:
pactfiles: test/Explore.Cli.Tests/pacts
broker_url: ${{ secrets.PACT_BROKER_BASE_URL }}
token: ${{ secrets.PACT_BROKER_TOKEN }}

- uses: pactflow/actions/can-i-deploy@v2
with:
to_environment: production
application_name: explore-cli
broker_url: ${{ secrets.PACT_BROKER_BASE_URL }}
token: ${{ secrets.PACT_BROKER_TOKEN }}
retry_while_unknown: 5
retry_interval: 10

- name: Create Package
run: dotnet pack --configuration $BUILD_CONFIG -o:package /p:PackageVersion=${{ steps.gitVersion.outputs.assemblySemVer }}
working-directory: src/Explore.Cli
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -398,4 +398,5 @@ FodyWeavers.xsd
*.sln.iml

# distribution artifacts
/dist
/dist
pacts/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# explore-cli

Simple utility CLI for importing data into SwaggerHub Explore.

![Can I Deploy](https://smartbear.pactflow.io/pacticipants/explore-cli/branches/main/latest-version/can-i-deploy/to-environment/production/badge)

```
_____ _ ____ _ _
Expand Down
Loading

0 comments on commit 5ec2fd0

Please sign in to comment.