Skip to content

Commit

Permalink
Feature/small changes (#29)
Browse files Browse the repository at this point in the history
* update version

* updates to the address validation

* minimized warnings

* added functionality for requested documents

* stablized test, bug fix

* update to .net 7.0

* #23 new interface added
#24 enable credential auth by pass the auth token
#25 make is consistent

* remove tryadd

* update app veyor .net version

* add correct appsettings

* updated fedexRateConfigurator

* consolidated stamps domestic/international endpoints

* consolidated stamps domestic/international endpoints II

* updating a projects for warnings and minimal api project

* #26 add github workflows
- targeting only 7.0 framework

---------

Co-authored-by: brandon <[email protected]>
Co-authored-by: kdcllc <[email protected]>
  • Loading branch information
3 people authored Apr 28, 2023
1 parent cd05d9f commit aa328f4
Show file tree
Hide file tree
Showing 131 changed files with 2,845 additions and 1,242 deletions.
27 changes: 26 additions & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
{
"version": 1,
"isRoot": true,
"tools": {}
"tools": {
"dotnet-outdated-tool": {
"version": "4.5.1",
"commands": [
"dotnet-outdated"
]
},
"gitversion.tool": {
"version": "5.12.0",
"commands": [
"dotnet-gitversion"
]
},
"roslynator.dotnet.cli": {
"version": "0.6.0",
"commands": [
"roslynator"
]
},
"csharpier": {
"version": "0.24.1",
"commands": [
"dotnet-csharpier"
]
}
}
}
79 changes: 79 additions & 0 deletions .github/workflows/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: "Dev CI/CD"

# Controls when the workflow will run
on:
workflow_dispatch:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [feature/*, release/*]

# environment vars
env:
configuration: Release
solution: EasyKeys.Shipping.sln

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
outputs:
Version: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# https://github.com/GitTools/actions
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.x"

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0 # to fetch all history for all tags and branches

# https://github.com/GitTools/actions/blob/main/docs/examples/github/gitversion/execute/usage-examples.md
- name: Use GitVersion
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
updateAssemblyInfo: false
updateAssemblyInfoFilename: false

- name: Display GitVersion outputs
run: |
echo "ShortSha: ${{ steps.gitversion.outputs.shortSha }}"
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
echo "VersionSourceSha: ${{ steps.gitversion.outputs.versionSourceSha }}"
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}"
echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}"
- name: Install .net7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"
include-prerelease: true

- name: Clear Nuget Feeds
run: dotnet nuget locals --clear all

- name: Restore dependencies
run: dotnet restore ${{ env.solution }} -v quiet

- name: Build
run: dotnet build ${{ env.solution }} --configuration ${{ env.configuration }} --no-restore -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }}

- name: Test
run: dotnet test ./test/**/*.UnitTest.csproj --no-build --verbosity normal

- name: Package
run: dotnet pack --no-build --configuration ${{ env.configuration }} --no-restore -p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} -o packages

- name: Publish Nuget Packages
run: dotnet nuget push packages/*.nupkg --api-key ${{ secrets.FEEDZ_API_KEY }} --source https://f.feedz.io/easykeys/core/nuget/index.json --skip-duplicate --no-symbols
40 changes: 40 additions & 0 deletions .github/workflows/master-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This is a basic workflow to help you get started with Actions

name: "Master PR CI"

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
pull_request:
branches: [master]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install .net7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"
include-prerelease: true

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore

- name: Test
run: dotnet test ./test/**/*.UnitTest.csproj --no-build --verbosity normal
103 changes: 103 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: "Master CI/CD"

# Controls when the workflow will run
on:
workflow_dispatch:
push:
branches: [master]

# environment vars
env:
configuration: Release
solution: EasyKeys.Shipping.sln

# The jobs run sequentially and with dependency
jobs:
# This workflow contains dotnetcore project build.
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
outputs:
Version: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# https://github.com/GitTools/actions
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.x"

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0 # to fetch all history for all tags and branches

# https://github.com/GitTools/actions/blob/main/docs/examples/github/gitversion/execute/usage-examples.md
- name: Use GitVersion
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
updateAssemblyInfo: false
updateAssemblyInfoFilename: false

- name: Display SemVer
run: |
echo "SemVer: $GITVERSION_SEMVER"
- name: Display GitVersion outputs
run: |
echo "ShortSha: ${{ steps.gitversion.outputs.shortSha }}"
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
echo "VersionSourceSha: ${{ steps.gitversion.outputs.versionSourceSha }}"
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}"
echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}"
# https://github.com/actions/setup-dotnet
- name: Install net7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"
include-prerelease: true

- name: Clear Nuget Feeds
run: dotnet nuget locals --clear all

- name: Restore dependencies
run: dotnet restore ${{ env.solution }} -v quiet

- name: Build
run: dotnet build ${{ env.solution }} --configuration ${{ env.configuration }} --no-restore -p:Version=${{ steps.gitversion.outputs.MajorMinorPatch }}

- name: Test
run: dotnet test ./test/**/*.UnitTest.csproj --no-build --verbosity normal

- name: Package
run: dotnet pack --no-build --configuration ${{ env.configuration }} --no-restore -p:Version=${{ steps.gitversion.outputs.MajorMinorPatch }} -o packages

- name: Publish Nuget Packages
run: dotnet nuget push packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols

# This workflow contains
tag:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Display GitVersion outputs
run: |
echo "Version: ${{ needs.build.outputs.Version }}"
echo "CommitsSinceVersionSource: ${{ needs.build.outputs.CommitsSinceVersionSource }}"
- name: Create Tag and Release
id: create_release
uses: actions/create-release@v1
if: needs.build.outputs.CommitsSinceVersionSource > 0 # only create a release if there has been a commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this token is provided by actions not need to create
with:
tag_name: ${{ needs.build.outputs.Version }}
release_name: Release ${{ needs.build.outputs.Version }}
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"adrianwilczynski.asp-net-core-snippet-pack",
"formulahendry.dotnet-test-explorer",
"visualstudioonlineapplicationinsights.application-insights",
"ms-dotnettools.csharp",
"humao.rest-client"
]
}
46 changes: 46 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Api",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-api",
"program": "${workspaceFolder}/src/Minimal.Apis/bin/Debug/net7.0/Minimal.Apis.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Minimal.Apis/",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Stamps.Console",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-stamps-console",
"program": "${workspaceFolder}/src/EasyKeys.Shipping.Stamps.Console/bin/Debug/net7.0/EasyKeys.Shipping.Stamps.Console.dll",
"args": [],
"cwd": "${workspaceFolder}/src/EasyKeys.Shipping.Stamps.Console",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "FedEx.Console",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-fedex-console",
"program": "${workspaceFolder}/src/EasyKeys.Shipping.FedEx.Console/bin/Debug/net7.0/EasyKeys.Shipping.FedEx.Console.dll",
"args": [],
"cwd": "${workspaceFolder}/src/EasyKeys.Shipping.FedEx.Console",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
"*.tasks": "xml",
"Dockerfile*": "dockerfile",
},
"dotnet-test-explorer.enableTelemetry": false
}
Loading

0 comments on commit aa328f4

Please sign in to comment.