Skip to content

Improve testing

Improve testing #359

Workflow file for this run

name: Build and Test
env:
solution_file: 'src/Vipps.net.sln'
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
paths-ignore:
- 'docs/**'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
strategy:
matrix:
dotnet-version: [ '8.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 dependencies Vipps.net
run: dotnet restore src/Vipps.net/Vipps.net.csproj
- name: Build Vipps.net.models.Epayment
run: dotnet build src/Vipps.net.Models.Epayment.csproj --no-restore --configuration Release
- name: Build Vipps.net.models.Checkout
run: dotnet build src/Vipps.net.Models.Checkout.csproj --no-restore --configuration Release
- name: Build vipps.net
run: dotnet build src/Vipps.net/Vipps.net.csproj --no-restore --configuration Release
- name: Install dependencies Vipps.net.Demo
run: dotnet restore src/Vipps.net.Demo/Vipps.net.Demo.csproj
- name: Build Vipps.net.Demo
run: dotnet build src/Vipps.net.Demo/Vipps.net.Demo.csproj --no-restore
- name: Install dependencies Vipps.net.AspCoreDemo
run: dotnet restore src/Vipps.net.AspCoreDemo/Vipps.net.AspCoreDemo.csproj
- name: Build Vipps.net.AspCoreDemo
run: dotnet build src/Vipps.net.AspCoreDemo/Vipps.net.AspCoreDemo.csproj --no-restore
- name: CSharpier check
run: |
dotnet tool restore --tool-manifest src/.config/dotnet-tools.json
cd src
dotnet csharpier . --check
- 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 }}