Skip to content

Commit f6c8c73

Browse files
author
Niall Langley
committed
Added simple github action for CI build and test
1 parent 68dab93 commit f6c8c73

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: .NET
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- feature/*
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v1
21+
with:
22+
dotnet-version: 3.1.x
23+
- name: Restore dependencies
24+
run: dotnet restore
25+
- name: Build
26+
run: dotnet build --no-restore
27+
- name: Test
28+
run: dotnet test --no-build --verbosity normal

DataPipelineTools.Tests/TestBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected IEnumerable<T> GetTestData<T>(string delimiter, Func<Dictionary<string
5151
var assemblyName = thisAssembly.GetName().Name;
5252
var nameSpace = GetType().Namespace;
5353

54-
var testDataRelativePath = nameSpace.Replace(assemblyName, "").Replace(".", "\\").TrimStart('\\');
54+
var testDataRelativePath = nameSpace.Replace(assemblyName, "").Replace(".", Path.DirectorySeparatorChar.ToString()).TrimStart(Path.DirectorySeparatorChar);
5555
var testDataPath = Path.Combine(Path.GetDirectoryName(assemblyPath), testDataRelativePath, $"{GetType().Name}_Data_{typeof(T).Name}.csv");
5656

5757
using (var fs = new FileStream(testDataPath, FileMode.Open, FileAccess.Read, FileShare.Read))

0 commit comments

Comments
 (0)