-
Notifications
You must be signed in to change notification settings - Fork 78
42 lines (37 loc) · 1.14 KB
/
test.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
name: Run tests
on:
push:
pull_request:
schedule:
- cron: '3 20 * * SUN'
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
name: Dotnet on ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Build
run: |
dotnet build MaxMind.GeoIP2
dotnet build MaxMind.GeoIP2.Benchmark
dotnet build MaxMind.GeoIP2.UnitTests
- name: Run benchmark
run: dotnet run -f net8.0 -p MaxMind.GeoIP2.Benchmark/MaxMind.GeoIP2.Benchmark.csproj
env:
MAXMIND_BENCHMARK_DB: ${{ github.workspace }}/MaxMind.GeoIP2.UnitTests/TestData/MaxMind-DB/test-data/GeoIP2-City-Test.mmdb
- name: Run tests
run: dotnet test MaxMind.GeoIP2.UnitTests/MaxMind.GeoIP2.UnitTests.csproj
env:
MAXMIND_TEST_BASE_DIR: ${{ github.workspace }}/MaxMind.GeoIP2.UnitTests