Change attribute to a Filter to disable test on CI
This commit is contained in:
parent
75cad1f3a5
commit
e6b7141188
|
@ -45,7 +45,7 @@ jobs:
|
|||
- name: Build
|
||||
run: dotnet build LLamaSharp.sln -c ${{ matrix.config }} --no-restore
|
||||
- name: Test
|
||||
run: dotnet test LLamaSharp.sln -c ${{ matrix.config }} -l "console;verbosity=detailed" --diag:logs/log.txt
|
||||
run: dotnet test LLamaSharp.sln -c ${{ matrix.config }} -l "console;verbosity=detailed" --diag:logs/log.txt --filter Category!=NoCI
|
||||
- name: Upload artifacts
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
namespace LLama.Unittest;
|
||||
|
||||
/// <summary>
|
||||
/// Extend Fact attributes to know if we are running on release or debug. The assumption is that on CI we run on Release
|
||||
/// </summary>
|
||||
public class IgnoreOnCiFact : FactAttribute
|
||||
{
|
||||
public IgnoreOnCiFact() {
|
||||
if( IsRelease()) {
|
||||
Skip = "Ignore on CI";
|
||||
}
|
||||
}
|
||||
|
||||
private static bool IsRelease()
|
||||
{
|
||||
#if DEBUG
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -33,7 +33,7 @@ namespace LLama.Unittest
|
|||
_lLavaWeights.Dispose();
|
||||
}
|
||||
|
||||
[IgnoreOnCiFact]
|
||||
[Fact,Trait("Category", "NoCI")]
|
||||
public void EmbedImageAsFileName()
|
||||
{
|
||||
int n_past = 0;
|
||||
|
@ -41,7 +41,7 @@ namespace LLama.Unittest
|
|||
Assert.True( _lLavaWeights.EvalImageEmbed( _context, emb, ref n_past ) );
|
||||
}
|
||||
|
||||
[IgnoreOnCiFact]
|
||||
[Fact,Trait("Category", "NoCI")]
|
||||
public void EmbedImageAsBinary()
|
||||
{
|
||||
int n_past = 0;
|
||||
|
|
Loading…
Reference in New Issue