@@ -21,7 +21,7 @@ public void IsBuildServerTest()
2121 public void IsGithubActionsTest ( )
2222 {
2323 var githubActions = Environment . GetEnvironmentVariable ( "GITHUB_WORKSPACE" ) ;
24- Console . WriteLine ( $ "GITHUB_WORKSPACE : { githubActions } ; IsBuildServer : { TestInfo . IsGithubActions } ") ;
24+ Console . WriteLine ( $ "GITHUB_WORKSPACE : { githubActions } ; IsGithubActions : { TestInfo . IsGithubActions } ") ;
2525
2626 if ( githubActions is null ) {
2727 Assert . That ( TestInfo . IsGithubActions , Is . False ) ;
@@ -34,26 +34,24 @@ public void IsGithubActionsTest()
3434 Assert . That ( TestInfo . NoIgnoreOnGithubActions ) ;
3535 }
3636 else {
37- Assert . That ( TestInfo . IsGithubActions , Is . EqualTo ( githubActions . Equals ( "true" , StringComparison . OrdinalIgnoreCase ) ) ) ;
38- if ( githubActions . Equals ( "true" , StringComparison . OrdinalIgnoreCase ) ) {
37+ Assert . That ( TestInfo . IsGithubActions , Is . True ) ;
3938
40- var githubActionsTrigger = Environment . GetEnvironmentVariable ( "GITHUB_EVENT_NAME" ) ;
41- Console . WriteLine ( $ "GITHUB_EVENT_NAME : { githubActionsTrigger } ; GithubActionTrigger : { TestInfo . GithubActionTrigger } ") ;
42- if ( githubActionsTrigger is null ) {
43- Assert . That ( TestInfo . GithubActionTrigger . HasValue , Is . False ) ;
44- }
45- else {
46- Assert . That ( TestInfo . GithubActionTrigger . HasValue , Is . True ) ;
47- }
39+ var githubActionsTrigger = Environment . GetEnvironmentVariable ( "GITHUB_EVENT_NAME" ) ;
40+ Console . WriteLine ( $ "GITHUB_EVENT_NAME : { githubActionsTrigger } ; GithubActionTrigger : { TestInfo . GithubActionTrigger } ") ;
41+ if ( githubActionsTrigger is null ) {
42+ Assert . That ( TestInfo . GithubActionTrigger . HasValue , Is . False ) ;
43+ }
44+ else {
45+ Assert . That ( TestInfo . GithubActionTrigger . HasValue , Is . True ) ;
46+ }
4847
49- var githbuActionsNoIgnore = Environment . GetEnvironmentVariable ( "GA_NO_IGNORE" ) ;
50- Console . WriteLine ( $ "GA_NO_IGNORE : { githbuActionsNoIgnore } ; NoIgnoreOnGithubActions : { TestInfo . NoIgnoreOnGithubActions } ") ;
51- if ( githbuActionsNoIgnore is null ) {
52- Assert . That ( TestInfo . NoIgnoreOnGithubActions , Is . False ) ;
53- }
54- else {
55- Assert . That ( TestInfo . NoIgnoreOnGithubActions , Is . EqualTo ( githbuActionsNoIgnore . Equals ( "true" , StringComparison . OrdinalIgnoreCase ) ) ) ;
56- }
48+ var githbuActionsNoIgnore = Environment . GetEnvironmentVariable ( "GA_NO_IGNORE" ) ;
49+ Console . WriteLine ( $ "GA_NO_IGNORE : { githbuActionsNoIgnore } ; NoIgnoreOnGithubActions : { TestInfo . NoIgnoreOnGithubActions } ") ;
50+ if ( githbuActionsNoIgnore is null ) {
51+ Assert . That ( TestInfo . NoIgnoreOnGithubActions , Is . False ) ;
52+ }
53+ else {
54+ Assert . That ( TestInfo . NoIgnoreOnGithubActions , Is . EqualTo ( githbuActionsNoIgnore . Equals ( "true" , StringComparison . OrdinalIgnoreCase ) ) ) ;
5755 }
5856 }
5957 }
0 commit comments