Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add pact #35

Merged
merged 11 commits into from
Sep 26, 2024
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
Loading