-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (33 loc) · 1.48 KB
/
dotnet-build.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
name: Dotnet build
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x # SDK Version to use.
- name: Cache Nuget packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: ${{ runner.os }}-nuget
- name: Install dependencies
run: dotnet restore src/WebEid.AspNetCore.Example.sln --source "https://gitlab.com/api/v4/projects/35362906/packages/nuget/index.json" --source "https://api.nuget.org/v3/index.json"
- name: Download digidoc
run: wget https://gitlab.com/api/v4/projects/35362906/packages/generic/digidoc/1.0.0/digidoc.zip
- name: Unzip digidoc
uses: montudor/action-zip@v1
with:
args: unzip -qq digidoc.zip -d src/WebEid.AspNetCore.Example/DigiDoc
- name: Build
run: dotnet publish --configuration Release --no-restore src/WebEid.AspNetCore.Example.sln --verbosity normal
- name: Test
run: dotnet test --no-restore --verbosity normal src/WebEid.AspNetCore.Example.sln
- name: Test building Docker image
working-directory: ./src
run: docker build -t web-eid-asp-dotnet-example .