-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (45 loc) · 1.9 KB
/
dotnet.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
# This workflow will build and test a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Build / Test
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
workflow_dispatch:
jobs:
build:
# Linux containers are not supported on the windows-latest runner.
# We use the ubuntu-latest runner to workaround this issue:
# https://github.com/actions/runner-images/issues/1143
# runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .NET 7.0
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
# The full MAUI Workload with the required target platforms is not supported on Linux.
# We build and test a solution filter without the MAUI client to workaround this issue.
#- name: Install MAUI Workload
# run: dotnet workload install maui --ignore-failed-sources
# Restore the dependencies of the EssSharp and EssSharp.Abstractions libraries.
- name: Restore EssSharp dependencies
run: dotnet restore EssSharp.slnf
# Build the EssSharp and EssSharp.Abstractions
- name: Build EssSharp
run: dotnet build EssSharp.slnf --no-restore
# Login to Docker Hub using the username and token secrets.
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Create a dedicated bridge network for the test containers.
- name: Create Docker network
run: docker network create --driver bridge standalone || true
# Test the EssSharp and EssSharp.Abstractions libraries.
- name: Test EssSharp
run: dotnet test EssSharp.slnf --no-build --nologo --logger:"console;verbosity=detailed"