Skip to content

Commit

Permalink
Revert changes (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkjenn authored Oct 11, 2024
1 parent 89cff5b commit 554e172
Show file tree
Hide file tree
Showing 206 changed files with 3,411 additions and 25,708 deletions.
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"isRoot": true,
"tools": {
"csharpier": {
"version": "0.29.2",
"version": "0.22.1",
"commands": [
"dotnet-csharpier"
]
},
"husky": {
"version": "0.7.1",
"version": "0.5.4",
"commands": [
"husky"
]
Expand Down
47 changes: 14 additions & 33 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,51 +18,32 @@ jobs:
id-token: write
strategy:
matrix:
dotnet-version: [ '8.0.x' ]
defaults:
run:
working-directory: ./src
dotnet-version: [ '7.0.x' ]
steps:
- name: Get repo
uses: actions/checkout@v3
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install Paket
run: dotnet tool install Paket --tool-path .paket

- name: Install dependencies
run: |
.paket/paket install
- name: Build Vipps.net.models.Epayment
run: dotnet build Vipps.net.Models.Epayment/Vipps.net.Models.Epayment.csproj --no-restore --configuration Release
- name: Build Vipps.net.models.Checkout
run: dotnet build Vipps.net.Models.Checkout/Vipps.net.Models.Checkout.csproj --no-restore --configuration Release
- name: Install dependencies Vipps.net
run: dotnet restore src/Vipps.net/Vipps.net.csproj
- name: Build vipps.net
run: dotnet build Vipps.net/Vipps.net.csproj --no-restore --configuration Release
run: dotnet build src/Vipps.net/Vipps.net.csproj --no-restore
- name: Install dependencies Vipps.net.Demo
run: dotnet restore Vipps.net.Demo/Vipps.net.Demo.csproj
run: dotnet restore src/Vipps.net.Demo/Vipps.net.Demo.csproj
- name: Build Vipps.net.Demo
run: dotnet build Vipps.net.Demo/Vipps.net.Demo.csproj --no-restore
run: dotnet build src/Vipps.net.Demo/Vipps.net.Demo.csproj --no-restore
- name: Install dependencies Vipps.net.AspCoreDemo
run: dotnet restore Vipps.net.AspCoreDemo/Vipps.net.AspCoreDemo.csproj
run: dotnet restore src/Vipps.net.AspCoreDemo/Vipps.net.AspCoreDemo.csproj
- name: Build Vipps.net.AspCoreDemo
run: dotnet build Vipps.net.AspCoreDemo/Vipps.net.AspCoreDemo.csproj --no-restore
run: dotnet build src/Vipps.net.AspCoreDemo/Vipps.net.AspCoreDemo.csproj --no-restore
- name: CSharpier check
run: |
dotnet tool restore --tool-manifest .config/dotnet-tools.json
dotnet tool restore --tool-manifest src/.config/dotnet-tools.json
cd src
dotnet csharpier . --check
- name: Pack NuGet Package with Paket
run: |
.paket/paket pack Vipps.net --version 0.0.0
- name: Install dependencies for IntegrationTests
run: dotnet restore Vipps.net.IntegrationTests/Vipps.net.IntegrationTests.csproj
working-directory: ./integrationtests/src

- name: Run Integration Tests
run: dotnet test Vipps.net.IntegrationTests/Vipps.net.IntegrationTests.csproj --no-restore --verbosity normal --environment vmp_net_sdk_CLIENT_ID=${{ secrets.CLIENT_ID }} --environment vmp_net_sdk_CLIENT_SECRET=${{ secrets.CLIENT_SECRET }} --environment vmp_net_sdk_SUBSCRIPTION_KEY=${{ secrets.SUBSCRIPTION_KEY }} --environment vmp_net_sdk_MERCHANT_SERIAL_NUMBER=${{ secrets.MERCHANT_SERIAL_NUMBER }}
working-directory: ./integrationtests/src
# - name: Install dependencies for IntegrationTests
# run: dotnet restore src/Tests/Vipps.net.IntegrationTests/Vipps.net.IntegrationTests.csproj
# - name: Run Integration Tests
# run: dotnet test src/Tests/Vipps.net.IntegrationTests/Vipps.net.IntegrationTests.csproj --no-restore --verbosity normal --environment vmp_net_sdk_CLIENT_ID=${{ secrets.CLIENT_ID }} --environment vmp_net_sdk_CLIENT_SECRET=${{ secrets.CLIENT_SECRET }} --environment vmp_net_sdk_SUBSCRIPTION_KEY=${{ secrets.SUBSCRIPTION_KEY }} --environment vmp_net_sdk_MERCHANT_SERIAL_NUMBER=${{ secrets.MERCHANT_SERIAL_NUMBER }}
46 changes: 12 additions & 34 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
contents: write # needed to push tag
strategy:
matrix:
dotnet-version: [ '8.0.x' ]
dotnet-version: [ '7.0.x' ]
steps:
- name: Get repo with depth
uses: actions/checkout@v3
Expand All @@ -23,43 +23,21 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: Install Paket
run: dotnet tool install Paket --tool-path .paket
working-directory: ./src

- name: Install dependencies
run: |
.paket/paket install
working-directory: ./src

- name: Build project
run: |
dotnet build "./src/Vipps.net.Models.Checkout" --configuration Release
dotnet build "./src/Vipps.net.Models.Epayment" --configuration Release
dotnet build "./src/Vipps.net" --configuration Release
- name: Pack NuGet Package with Paket
run: |
.paket/paket pack Vipps.net
working-directory: ./src

# Setup necessary info to create tag
- name: Set tag variable with v, for use in tag and release based on packed NuGet
run: |
RELEASE_VERSION=$(find ./src/Vipps.net -maxdepth 1 -name 'Vipps.net.*.nupkg' \
| head -n 1 \
| xargs -n 1 basename \
| grep -oP '(\d+\.\d+\.\d+(.*?))')
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
echo "RELEASE_TAG=v${RELEASE_VERSION}" >> $GITHUB_ENV
- name: Restore dependencies
run: dotnet restore "./src/Vipps.net/Vipps.net.csproj"
# Create Nuget package.
- name: Pack Nuget
run: dotnet pack "./src/Vipps.net/Vipps.net.csproj" --include-source --output out --configuration Release --no-restore
# Setup necessary info to create tag
- name: Set tag variable with v, for use in tag and release based on packed Nuget
run: "echo \"RELEASE_TAG=v$(find ./out -maxdepth 1 -name Vipps.net.*.nupkg | grep -oP '((\\d+)\\.(\\d+)\\.(\\d+)(.*?))')\" >> $GITHUB_ENV"
- name: Configure git username
run: git config user.name github-actions-bot
- name: Configure git user email
run: git config user.email noreply@vipps.no
# Create git tag
- name: Create Tag
run: git tag v${{ env.RELEASE_TAG }} -m ${{ env.RELEASE_TAG }}
run: git tag ${{ env.RELEASE_TAG }} -m ${{ env.RELEASE_TAG }}
- name: Publish Tag
run: git push --tags
# Create git release
Expand Down Expand Up @@ -89,7 +67,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ env.RELEASE_TAG }}
run: |
gh release upload ${{ env.RELEASE_TAG }} src/Vipps.net/Vipps.net.${{ env.RELEASE_VERSION }}.nupkg --clobber
gh release upload ${{ env.RELEASE_TAG }} out/* --clobber
# Publish Nuget package
- name: Publish Nuget package
run: dotnet nuget push src/Vipps.net/Vipps.net.${{ env.RELEASE_VERSION }}.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
run: dotnet nuget push out/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
17 changes: 6 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ mono_crash.*
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
Expand Down Expand Up @@ -62,9 +61,6 @@ project.lock.json
project.fragment.lock.json
artifacts/

# ASP.NET Scaffolding
ScaffoldingReadMe.txt

# StyleCop
StyleCopReport.xml

Expand Down Expand Up @@ -141,11 +137,6 @@ _TeamCity*
.axoCover/*
!.axoCover/settings.json

# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info

# Visual Studio code coverage results
*.coverage
*.coveragexml
Expand Down Expand Up @@ -358,5 +349,9 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/

# Fody - auto-generated XML schema
FodyWeavers.xsd
# Husky should only be enabled manually per developer for now
/.husky/pre-commit

# Do not include secrets from windows forms demo
/src/Vipps.net.WindowsFormsDemo/secrets.xml
/src/Vipps.net.AspDemo/secrets.xml
7 changes: 0 additions & 7 deletions .idea/CSharpierPlugin.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .openapi-generator-ignore

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions integrationtests/src/Vipps.net.IntegrationTests/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions integrationtests/src/Vipps.net.IntegrationTests/nuget.config

This file was deleted.

37 changes: 0 additions & 37 deletions openapitools.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/.csharpierignore

This file was deleted.

6 changes: 0 additions & 6 deletions src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ dotnet_diagnostic.CS8618.severity = silent
# Core EditorConfig Options #
###############################

[Vipps.net.Models.Epayment/**/*.{cs,csproj}]
generated_code = true

[Vipps.net.Models.Checkout/**/*.{cs,csproj}]
generated_code = true

# All files
[*]
indent_style = space
Expand Down
Loading

0 comments on commit 554e172

Please sign in to comment.