File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
libraries/tests/AWS.Lambda.Powertools.Common.Tests/Core Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,14 @@ jobs:
22
22
dotnet-version : |
23
23
6.0.405
24
24
8.0.101
25
+ - name : Install solution dependencies
26
+ run : dotnet restore
25
27
- name : Build
26
- run : dotnet build --configuration Release
28
+ run : dotnet build --configuration Release --no-restore
27
29
- name : Test Examples
28
30
run : dotnet test ../examples/
29
31
- name : Test & Code Coverage
30
- run : dotnet test --collect:"XPlat Code Coverage" -r codecov --verbosity normal
32
+ run : dotnet test --collect:"XPlat Code Coverage" -r codecov --no-restore -- verbosity normal
31
33
- name : Codecov
32
34
uses : codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # 3.1.0
33
35
with :
Original file line number Diff line number Diff line change 5
5
using System . Xml . Linq ;
6
6
using System . Xml . XPath ;
7
7
using Xunit ;
8
+ using Xunit . Abstractions ;
8
9
9
10
namespace AWS . Lambda . Powertools . Common . Tests ;
10
11
11
12
public class PowertoolsEnvironmentTest : IDisposable
12
13
{
14
+ private readonly ITestOutputHelper _testOutputHelper ;
15
+
16
+ public PowertoolsEnvironmentTest ( ITestOutputHelper testOutputHelper )
17
+ {
18
+ _testOutputHelper = testOutputHelper ;
19
+ }
20
+
13
21
[ Fact ]
14
22
public void Set_Execution_Environment ( )
15
23
{
@@ -69,7 +77,14 @@ public void Should_Use_Aspect_Injector_281()
69
77
{
70
78
// This test must be present until Issue: https://github.com/pamidur/aspect-injector/issues/220 is fixed
71
79
72
- var directory = Path . GetFullPath ( "../../../../../src/Directory.Packages.props" ) ;
80
+ var path = "../../../../../src/Directory.Packages.props" ;
81
+ // Test to see if running in CI/CD and add an extra ../
82
+ if ( Environment . CurrentDirectory . EndsWith ( "codecov" ) )
83
+ {
84
+ path = "../../../../../../src/Directory.Packages.props" ;
85
+ }
86
+
87
+ var directory = Path . GetFullPath ( path ) ;
73
88
var doc = XDocument . Load ( directory ) ;
74
89
75
90
var packageReference = doc . XPathSelectElements ( "//PackageVersion" )
You can’t perform that action at this time.
0 commit comments