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
Changes
nnew file mode 100644@@@ -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.shnnew file mode 100644@@@ -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@@@ -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 {@@@ -1,3 +1,5 @@++//go:build !windows++package nodeimport (
new file mode 100644
new file mode 100644
@@ -0,0 +1,82 @@
@@ -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
new file mode 100644
new file mode 100644
@@ -0,0 +1,29 @@
@@ -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
@@ -81,7 +81,7 @@ func TestPair(t *testing.T) {
@@ -81,7 +81,7 @@ func TestPair(t *testing.T) {
t.Fatalf("output: %s %s", out, errOut)
t.Fatalf("output: %s %s", out, errOut)
}
}
st, _ := os.Stat(filepath.Join(home, "credential.json"))
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())
t.Fatalf("mode %o", st.Mode().Perm())
}
}
if _, err := os.Stat(filepath.Join(home, "config.json")); err != nil {
if _, err := os.Stat(filepath.Join(home, "config.json")); err != nil {
@@ -1,3 +1,5 @@
@@ -1,3 +1,5 @@
+//go:build !windows
+
package node
package node
import (
import (