-
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (46 loc) · 1.28 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
name: .NET Core CI with Docker
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
services:
sql-server:
image: mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04
ports:
- 1433:1433
options: >-
--env ACCEPT_EULA=Y
--env SA_PASSWORD=YourStrong!Passw0rd
--health-cmd="/opt/mssql-tools/bin/sqlcmd -U sa -P YourStrong!Passw0rd -Q 'SELECT 1'"
--health-interval=10s
--health-timeout=5s
--health-retries=10
redis:
image: redis:latest
ports:
- 6379:6379
options: --health-cmd "redis-cli ping || exit 1"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Run linters
uses: wearerequired/lint-action@v2
with:
dotnet_format: true
args: --workspace ./CacheManager.sln
- name: Restore dependencies
run: dotnet restore
- name: Build the project
run: dotnet build --configuration Release
- name: Run tests
run: dotnet test --configuration Release --no-build