openvibers/openvibe.link Commits

CI: go vet and race tests, macOS and Windows tests, cross-compile, plugin tests on Python 3.9-3.13, shellcheck; release on tags

OP OpenVibers committed 29 Sept 2026 · 8326c7752b · 4 files, +114 −1


Changes

ddiff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
nnew file mode 100644
iindex 0000000..66d31db
---- /dev/null
++++ b/.github/workflows/ci.yml
@@@ -0,0 +1,82 @@
++name: ci
++
++on:
++ push:
++ branches: [main]
++ pull_request:
++
++permissions:
++ contents: read
++
++jobs:
++ go:
++ name: go vet and test (race)
++ runs-on: ubuntu-latest
++ steps:
++ - uses: actions/checkout@v4
++ - uses: actions/setup-go@v5
++ with:
++ go-version-file: go.mod
++ - uses: actions/setup-python@v5
++ with:
++ python-version: "3.11"
++ # The end-to-end tests run the real Python dry-run plugin; PyAV decodes the test pattern with libavcodec.
++ - run: pip install av
++ - run: test -z "$(gofmt -l .)" || (gofmt -l . && exit 1)
++ - run: go vet ./...
++ - run: go test -race -count=1 ./...
++
++ build:
++ name: cross-compile
++ runs-on: ubuntu-latest
++ steps:
++ - uses: actions/checkout@v4
++ - uses: actions/setup-go@v5
++ with:
++ go-version-file: go.mod
++ - run: scripts/dist.sh ci
++ - run: ls -l dist && cat dist/SHA256SUMS
++
++ go-other-os:
++ name: go test (${{ matrix.os }})
++ strategy:
++ fail-fast: false
++ matrix:
++ os: [macos-latest, windows-latest]
++ runs-on: ${{ matrix.os }}
++ steps:
++ - uses: actions/checkout@v4
++ - uses: actions/setup-go@v5
++ with:
++ go-version-file: go.mod
++ - uses: actions/setup-python@v5
++ with:
++ python-version: "3.11"
++ - run: go test -count=1 ./...
++
++ python:
++ name: plugins (python ${{ matrix.python }})
++ runs-on: ubuntu-latest
++ strategy:
++ fail-fast: false
++ matrix:
++ python: ["3.9", "3.11", "3.12", "3.13"]
++ steps:
++ - uses: actions/checkout@v4
++ - uses: actions/setup-python@v5
++ with:
++ python-version: ${{ matrix.python }}
++ - run: pip install pytest pillow numpy
++ - run: python -m pytest -q plugins/sdk/tests
++ - run: python -m pytest -q plugins/dryrun/tests
++ - run: python -m pytest -q plugins/adeept_adr036/tests
++ - run: python -m pytest -q plugins/cozmo/tests
++ - name: packages install
++ run: pip install ./plugins/sdk ./plugins/dryrun ./plugins/adeept_adr036 ./plugins/cozmo
++
++ shell:
++ name: shellcheck
++ runs-on: ubuntu-latest
++ steps:
++ - uses: actions/checkout@v4
++ - run: shellcheck -s sh install/install.sh scripts/dist.sh
ddiff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
nnew file mode 100644
iindex 0000000..ccb4014
---- /dev/null
++++ b/.github/workflows/release.yml
@@@ -0,0 +1,29 @@
++name: release
++
++on:
++ push:
++ tags: ["v*"]
++
++permissions:
++ contents: write
++
++jobs:
++ release:
++ runs-on: ubuntu-latest
++ steps:
++ - uses: actions/checkout@v4
++ - uses: actions/setup-go@v5
++ with:
++ go-version-file: go.mod
++ - uses: actions/setup-python@v5
++ with:
++ python-version: "3.11"
++ - run: pip install pytest pillow numpy
++ - run: go vet ./... && go test -count=1 ./...
++ - run: |
++ for p in sdk dryrun adeept_adr036 cozmo; do python -m pytest -q plugins/$p/tests; done
++ - run: scripts/dist.sh "${GITHUB_REF_NAME}"
++ - name: publish the release
++ env:
++ GH_TOKEN: ${{ github.token }}
++ run: gh release create "${GITHUB_REF_NAME}" dist/* --title "OpenVibe Node ${GITHUB_REF_NAME}" --generate-notes
ddiff --git a/cmd/openvibe-node/main_test.go b/cmd/openvibe-node/main_test.go
iindex 6976627..7bc1767 100644
---- a/cmd/openvibe-node/main_test.go
++++ b/cmd/openvibe-node/main_test.go
@@@ -81,7 +81,7 @@ func TestPair(t *testing.T) {
t.Fatalf("output: %s %s", out, errOut)
}
st, _ := os.Stat(filepath.Join(home, "credential.json"))
-- if st.Mode().Perm() != 0o600 {
++ if runtime.GOOS != "windows" && st.Mode().Perm() != 0o600 {
t.Fatalf("mode %o", st.Mode().Perm())
}
if _, err := os.Stat(filepath.Join(home, "config.json")); err != nil {
ddiff --git a/internal/node/node_test.go b/internal/node/node_test.go
iindex a2aa9e1..cdbaea1 100644
---- a/internal/node/node_test.go
++++ b/internal/node/node_test.go
@@@ -1,3 +1,5 @@
++//go:build !windows
++
package node
import (