mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-04 01:28:45 -04:00
feat(CI&go4k): Run go tests in cloud, skipping sample tests if on another platform than Windows.
This commit is contained in:
parent
a799ee2b6d
commit
c39f434c6b
@ -1,4 +1,4 @@
|
|||||||
# Run unit tests using CTest
|
# Run unit tests using CTest and go tests
|
||||||
name: Tests
|
name: Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@ -15,12 +15,13 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
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: actions/checkout@v2
|
||||||
- uses: ilammy/setup-nasm@v1.1.0
|
- uses: ilammy/setup-nasm@v1.1.0
|
||||||
- run: /home/runner/nasm/nasm -version
|
- run: /home/runner/nasm/nasm -version
|
||||||
- env:
|
- name: Running ctests
|
||||||
|
env:
|
||||||
ASM_NASM: /home/runner/nasm/nasm
|
ASM_NASM: /home/runner/nasm/nasm
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
@ -28,3 +29,7 @@ jobs:
|
|||||||
cmake -GNinja ..
|
cmake -GNinja ..
|
||||||
ninja
|
ninja
|
||||||
ctest --output-on-failure
|
ctest --output-on-failure
|
||||||
|
- name: Running go tests
|
||||||
|
run: |
|
||||||
|
cd go4k
|
||||||
|
go test . ./bridge
|
@ -28,6 +28,10 @@ func TestAllAsmFiles(t *testing.T) {
|
|||||||
basename := filepath.Base(filename)
|
basename := filepath.Base(filename)
|
||||||
testname := strings.TrimSuffix(basename, path.Ext(basename))
|
testname := strings.TrimSuffix(basename, path.Ext(basename))
|
||||||
t.Run(testname, func(t *testing.T) {
|
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)
|
asmcode, err := ioutil.ReadFile(filename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("cannot read the .asm file: %v", filename)
|
t.Fatalf("cannot read the .asm file: %v", filename)
|
||||||
@ -81,6 +85,10 @@ func TestSerializingAllAsmFiles(t *testing.T) {
|
|||||||
basename := filepath.Base(filename)
|
basename := filepath.Base(filename)
|
||||||
testname := strings.TrimSuffix(basename, path.Ext(basename))
|
testname := strings.TrimSuffix(basename, path.Ext(basename))
|
||||||
t.Run(testname, func(t *testing.T) {
|
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)
|
asmcode, err := ioutil.ReadFile(filename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("cannot read the .asm file: %v", filename)
|
t.Fatalf("cannot read the .asm file: %v", filename)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user