Skip to content

Commit 0ea47df

Browse files
committed
Add CI workflow for tests on push to master and PRs
1 parent 8c03bea commit 0ea47df

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
services:
16+
redis:
17+
image: redis:latest
18+
options: >-
19+
--health-cmd "redis-cli ping"
20+
--health-interval 10s
21+
--health-timeout 5s
22+
--health-retries 5
23+
ports:
24+
- 6379:6379
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Setup dotnet
31+
uses: actions/setup-dotnet@v4
32+
with:
33+
dotnet-version: |
34+
8.0.x
35+
9.0.x
36+
10.0.x
37+
38+
- name: Restore dependencies
39+
run: dotnet restore
40+
41+
- name: Build
42+
run: dotnet build --no-restore --verbosity minimal
43+
44+
- name: Run .NET 10 Tests
45+
run: dotnet test -f net10.0 --no-build --verbosity normal
46+
env:
47+
REDIS_HOST: localhost
48+
49+
- name: Run .NET 9 Tests
50+
run: dotnet test -f net9.0 --no-build --verbosity normal
51+
env:
52+
REDIS_HOST: localhost

0 commit comments

Comments
 (0)