diff --git a/.github/workflows/ctest.yml b/.github/workflows/test.yml similarity index 64% rename from .github/workflows/ctest.yml rename to .github/workflows/test.yml index 38b2cd5..b27824d 100644 --- a/.github/workflows/ctest.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -# Run unit tests using CTest +# Run unit tests using CTest and go tests name: Tests on: @@ -12,15 +12,16 @@ on: - dev jobs: - test: + test: runs-on: ubuntu-latest steps: - - name: get-cmake - uses: lukka/get-cmake@v3.18.3 + - uses: lukka/get-cmake@v3.18.3 + - uses: actions/setup-go@v2 - uses: actions/checkout@v2 - uses: ilammy/setup-nasm@v1.1.0 - run: /home/runner/nasm/nasm -version - - env: + - name: Running ctests + env: ASM_NASM: /home/runner/nasm/nasm run: | mkdir build @@ -28,3 +29,7 @@ jobs: cmake -GNinja .. ninja ctest --output-on-failure + - name: Running go tests + run: | + cd go4k + go test . ./bridge diff --git a/go4k/asmformat_test.go b/go4k/asmformat_test.go index d780ce0..f986266 100644 --- a/go4k/asmformat_test.go +++ b/go4k/asmformat_test.go @@ -28,6 +28,10 @@ func TestAllAsmFiles(t *testing.T) { basename := filepath.Base(filename) testname := strings.TrimSuffix(basename, path.Ext(basename)) t.Run(testname, func(t *testing.T) { + if runtime.GOOS != "windows" && strings.Contains(testname, "sample") { + t.Skip("Samples (gm.dls) available only on Windows") + return + } asmcode, err := ioutil.ReadFile(filename) if err != nil { t.Fatalf("cannot read the .asm file: %v", filename) @@ -81,6 +85,10 @@ func TestSerializingAllAsmFiles(t *testing.T) { basename := filepath.Base(filename) testname := strings.TrimSuffix(basename, path.Ext(basename)) t.Run(testname, func(t *testing.T) { + if runtime.GOOS != "windows" && strings.Contains(testname, "sample") { + t.Skip("Samples (gm.dls) available only on Windows") + return + } asmcode, err := ioutil.ReadFile(filename) if err != nil { t.Fatalf("cannot read the .asm file: %v", filename)