-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (61 loc) · 2.7 KB
/
build_and_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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' ]
defaults:
run:
working-directory: ./src
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: Build vipps.net
run: dotnet build Vipps.net/Vipps.net.csproj --no-restore --configuration Release
- name: Install dependencies Vipps.net.Demo
run: dotnet restore Vipps.net.Demo/Vipps.net.Demo.csproj
- name: Build Vipps.net.Demo
run: dotnet build 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
- name: Build Vipps.net.AspCoreDemo
run: dotnet build Vipps.net.AspCoreDemo/Vipps.net.AspCoreDemo.csproj --no-restore
- name: CSharpier check
run: |
dotnet tool restore --tool-manifest .config/dotnet-tools.json
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