-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (47 loc) · 2.05 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
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: [ '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 dependencies Vipps.net
run: dotnet restore src/Vipps.net/Vipps.net.csproj
- name: Build vipps.net
run: dotnet build src/Vipps.net/Vipps.net.csproj --no-restore
- 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 }}