Skip to content

Commit 3148152

Browse files
authored
Use multiline commands in build-test actions to get proper exit codes for tests (#620)
* use nuget pack not dotnet pack * name * setup nuget separately * change release name back * readme * image before releases * use multiline * use line concatenation for a couple places * no slash * use && * break up steps more
1 parent c883155 commit 3148152

File tree

1 file changed

+13
-23
lines changed

1 file changed

+13
-23
lines changed

.github/workflows/dotnet.yml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,21 @@ jobs:
1717
with:
1818
dotnet-version: 5.0.x
1919
- name: Restore dependencies
20-
run: cd mzLib; dotnet restore
20+
run: cd mzLib && dotnet restore
2121
- name: Build
22-
run:
23-
cd mzLib;
24-
dotnet build --no-restore;
25-
dotnet build --no-restore ./Test/Test.csproj;
26-
dotnet build --no-restore ./TestFlashLFQ/TestFlashLFQ.csproj;
27-
- name: Add coverlet collector
28-
run:
29-
cd mzLib;
30-
dotnet add Test/Test.csproj package coverlet.collector;
31-
dotnet add TestFlashLFQ/TestFlashLFQ.csproj package coverlet.collector;
22+
run: cd mzLib && dotnet build --no-restore
23+
- name: Build (Test)
24+
run: cd mzLib && dotnet build --no-restore ./Test/Test.csproj
25+
- name: Build (TestFlashLFQ)
26+
run: cd mzLib && dotnet build --no-restore ./TestFlashLFQ/TestFlashLFQ.csproj
27+
- name: Add coverlet collector (Test)
28+
run: cd mzLib && dotnet add Test/Test.csproj package coverlet.collector
29+
- name: Add coverlet collector (TestFlashLFQ)
30+
run: cd mzLib && dotnet add TestFlashLFQ/TestFlashLFQ.csproj package coverlet.collector
3231
- name: Test
33-
run:
34-
cd mzLib;
35-
dotnet test --no-build --verbosity normal
36-
--collect:"XPlat Code Coverage" /p:CoverletOutputFormat=cobertura
37-
./Test/Test.csproj;
38-
dotnet test --no-build --verbosity normal
39-
--collect:"XPlat Code Coverage" /p:CoverletOutputFormat=cobertura
40-
./TestFlashLFQ/TestFlashLFQ.csproj;
41-
- name: Directory lists
42-
run:
43-
ls;
44-
ls mzLib;
32+
run: cd mzLib && dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage" /p:CoverletOutputFormat=cobertura ./Test/Test.csproj
33+
- name: TestFlashLFQ
34+
run: cd mzLib && dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage" /p:CoverletOutputFormat=cobertura ./TestFlashLFQ/TestFlashLFQ.csproj
4535
- name: Codecov
4636
uses: codecov/codecov-action@v2
4737
with:

0 commit comments

Comments
 (0)