Skip to content

Commit b8ce11b

Browse files
committed
Merge remote-tracking branch 'example-history/main' into WE2-933-example
2 parents 2c24ca6 + 408df75 commit b8ce11b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3663
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Dotnet build
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Setup dotnet
13+
uses: actions/setup-dotnet@v4
14+
with:
15+
dotnet-version: 8.0.x # SDK Version to use.
16+
17+
- name: Cache Nuget packages
18+
uses: actions/cache@v4
19+
with:
20+
path: ~/.nuget/packages
21+
# Look to see if there is a cache hit for the corresponding requirements file
22+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
23+
restore-keys: ${{ runner.os }}-nuget
24+
25+
- name: Install dependencies
26+
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"
27+
28+
- name: Download RIA repository public key
29+
run: wget https://github.com/web-eid/web-eid-asp-dotnet-example/raw/main/src/ria_public_key.gpg
30+
31+
- name: Copy RIA repository key to keyrings
32+
run: sudo cp ria_public_key.gpg /usr/share/keyrings/ria-repository.gpg
33+
34+
- name: Add RIA repository to APT
35+
run: |
36+
echo "deb [signed-by=/usr/share/keyrings/ria-repository.gpg] https://installer.id.ee/media/ubuntu/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ria-repository.list
37+
38+
- name: Update APT and install libdigidocpp-csharp
39+
run: |
40+
sudo apt update
41+
sudo apt install -y --no-install-recommends libdigidocpp-csharp
42+
43+
- name: Copy the necessary DigiDoc C# library files
44+
run: sudo cp /usr/include/digidocpp_csharp/* src/WebEid.AspNetCore.Example/DigiDoc/
45+
46+
- name: Build
47+
run: dotnet publish --configuration Release --no-restore src/WebEid.AspNetCore.Example.sln --verbosity normal
48+
49+
- name: Test
50+
run: dotnet test --no-restore --verbosity normal src/WebEid.AspNetCore.Example.sln
51+
52+
- name: Test building Docker image
53+
working-directory: ./src
54+
run: docker build -t web-eid-asp-dotnet-example .

0 commit comments

Comments
 (0)