diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index c9c1d17..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Build and Publish Latest - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - -on: - workflow_dispatch: - push: - branches: [ 'main' ] - paths-ignore: - - 'README.md' - -jobs: - test: - uses: ./.github/workflows/test.yml diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml deleted file mode 100644 index 92db2aa..0000000 --- a/.github/workflows/pr-labeler.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: PR Test Label Manager - -on: - pull_request_target: - branches: [ main ] - types: [ opened, synchronize, reopened ] - -jobs: - pr_test_label_manager: - name: PR Test Label Manager - runs-on: ubuntu-latest - if: | - github.event_name == 'pull_request_target' && - contains(fromJson('["opened", "synchronize", "reopened"]'), github.event.action) - steps: - - name: "Check Membership and Label PR" - uses: actions/github-script@v6 - id: check-membership - with: - github-token: ${{ secrets.PR_TOKEN }} - script: | - let prNumber = context.payload.pull_request && context.payload.pull_request.number; - try { - await github.rest.issues.removeLabel({owner: "viam-modules", repo: "wit-motion", issue_number: prNumber, name: "safe to test"}); - } catch (err) { - core.info(`Non-fatal error ${err}, while trying to remove 'safe to test' label.`); - } - let orgResp = await github.rest.orgs.checkMembershipForUser({org: "viam-modules", username: context.payload.sender.login}); - if (orgResp.status === 204) { - // order of labeling events must be preserved, so two seperate calls - await github.rest.issues.addLabels({owner: "viam-modules", repo: "wit-motion", issue_number: prNumber, labels: ["safe to test"]}); - return true; - } - return false; - - - name: Add Unsafe PR Comment - if: steps.check-membership.outputs.result != 'true' - uses: marocchino/sticky-pull-request-comment@v2 - with: - recreate: true - message: For security reasons, this PR must be labeled with `safe to test` in order for tests to run. diff --git a/.github/workflows/pullrequest-trusted.yml b/.github/workflows/pullrequest-trusted.yml deleted file mode 100644 index 9f2aa57..0000000 --- a/.github/workflows/pullrequest-trusted.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Pull Request Update - -concurrency: - group: pullrequest-${{ github.head_ref }} - cancel-in-progress: true - -on: - pull_request_target: - branches: [ main ] - types: [ labeled ] - -jobs: - test: - if: (github.event.label.name == 'safe to test' || github.event.label.name == 'appimage') - uses: viam-modules/wit-motion/.github/workflows/test.yml@main - secrets: - MONGODB_TEST_OUTPUT_URI: ${{ secrets.MONGODB_TEST_OUTPUT_URI }} - DOCKER_PUBLIC_READONLY_PAT: ${{ secrets.DOCKER_PUBLIC_READONLY_PAT }} - - license_finder: - uses: viam-modules/wit-motion/.github/workflows/license_finder.yml@main diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml new file mode 100644 index 0000000..800aba3 --- /dev/null +++ b/.github/workflows/pullrequest.yml @@ -0,0 +1,15 @@ +name: Pull Request Update + +concurrency: + group: pullrequest-${{ github.head_ref }} + cancel-in-progress: true + +on: + pull_request_target: + +jobs: + test: + uses: ./.github/workflows/test.yml + + license_finder: + uses: ./.github/workflows/license_finder.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2624ce6..4004020 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,7 @@ jobs: uses: ./.github/workflows/test.yml publish: + needs: test strategy: matrix: include: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b7cbb9..4ede5a5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,6 +50,10 @@ jobs: exit 1 fi + - name: Run go unit tests + run: | + sudo -u testbot bash -lc 'make test' + - name: make build run: | sudo -u testbot bash -lc 'make build' \ No newline at end of file diff --git a/Makefile b/Makefile index 96f4619..951cfdb 100644 --- a/Makefile +++ b/Makefile @@ -40,4 +40,7 @@ test-go: tool-install go test -race ./... clean-all: - git clean -fxd \ No newline at end of file + git clean -fxd + +license-check: + license_finder \ No newline at end of file diff --git a/doc/dependency_decisions.yml b/doc/dependency_decisions.yml new file mode 100644 index 0000000..46d67da --- /dev/null +++ b/doc/dependency_decisions.yml @@ -0,0 +1,225 @@ +--- +- - :permit + - MIT + - :who: + :why: + :versions: [] + :when: 2022-08-01 21:53:06.561636718 Z +- - :permit + - New BSD + - :who: + :why: + :versions: [] + :when: 2022-08-15 13:09:14.673806968 Z +- - :permit + - Apache 2.0 + - :who: + :why: + :versions: [] + :when: 2022-08-15 13:15:11.855751606 Z +- - :permit + - Simplified BSD + - :who: + :why: + :versions: [] + :when: 2022-08-15 13:17:08.745016552 Z +- - :permit + - ISC + - :who: + :why: + :versions: [] + :when: 2022-08-15 13:37:40.979906881 Z +- - :license + - github.com/ajstarks/svgo + - Creative Commons Attribution 4.0 International Public License + - :who: + :license_links: https://github.com/ajstarks/svgo/blob/1546f124cd8b0cba8d505fa2ddb110c211670c59/LICENSE + :versions: [] + :when: 2022-08-15 14:34:00.115389050 Z +- - :license + - github.com/go-fonts/liberation + - New BSD + - :who: + :license_links: https://github.com/go-fonts/liberation/blob/0c2fdab5e932afd0923f4f71ae23691a66305ef6/LICENSE + :versions: [] + :when: 2022-08-15 14:47:01.153930427 Z +- - :license + - github.com/go-gl/mathgl + - New BSD + - :who: + :license_links: https://github.com/go-gl/mathgl/blob/45f44e1fbc36e29eb200186c5fd63828a2ffc540/LICENSE + :versions: [] + :when: 2022-08-15 14:51:09.537862545 Z +- - :license + - github.com/go-latex/latex + - New BSD + - :who: + :why: 'TODO(RSDK-583): why is license finder unable to detect this license automatically?' + :license_links: https://github.com/go-latex/latex/blob/c0d11ff05a81a63afdffbba6e577b2a3a6e69c85/LICENSE + :versions: [] + :when: 2022-08-15 14:55:14.011453253 Z +- - :license + - github.com/improbable-eng/grpc-web + - Apache License 2.0 + - :who: + :why: 'TODO(RSDK-583): why is license finder unable to detect this license automatically?' + :license_links: https://github.com/improbable-eng/grpc-web/blob/90ce72a31aa7bdfd6eae03fc735953902949c0de/LICENSE.txt + :versions: [] + :when: 2022-08-15 14:58:14.484806455 Z +- - :license + - github.com/jmespath/go-jmespath + - Apache License 2.0 + - :who: + :why: 'TODO(RSDK-583): why is license finder unable to detect this license automatically?' + :license_links: https://github.com/jmespath/go-jmespath/blob/b0104c826a24d7c202da8e1dbfb9ea4cfa35d774/LICENSE + :versions: [] + :when: 2022-08-15 15:00:22.812116090 Z +- - :license + - github.com/xdg-go/pbkdf2 + - Apache License 2.0 + - :who: + :why: 'TODO(RSDK-583): why is license finder unable to detect this license automatically?' + :license_links: https://github.com/xdg-go/pbkdf2/blob/7f452ef1dac88350356f1bb84a23748205e64b96/LICENSE + :versions: [] + :when: 2022-08-15 15:02:55.419786268 Z +- - :license + - github.com/xdg-go/scram + - Apache License 2.0 + - :who: + :why: 'TODO(RSDK-583): why is license finder unable to detect this license automatically?' + :license_links: https://github.com/xdg-go/scram/blob/ef29d5590bacede26100601bb2f7d9bb08bacc75/LICENSE + :versions: [] + :when: 2022-08-15 15:48:55.549018227 Z +- - :license + - github.com/xdg-go/stringprep + - Apache License 2.0 + - :who: + :why: 'TODO(RSDK-583): why is license finder unable to detect this license automatically?' + :license_links: https://github.com/xdg-go/stringprep/blob/eb5c8f240eb1ea3fe0144fd4d3e0c305492d8eb1/LICENSE + :versions: [] + :when: 2022-08-15 15:50:08.659677721 Z +- - :license + - go-hep.org/x/hep + - New BSD + - :who: + :why: 'TODO(RSDK-583): why is license finder unable to detect this license automatically?' + :license_links: https://github.com/go-hep/hep/blob/535619c28f900dcd37c522f2b9d593ec61b7b8dd/LICENSE + :versions: [] + :when: 2022-08-15 15:53:36.138009630 Z +- - :license + - gonum.org/v1/plot + - New BSD + - :who: + :why: 'TODO(RSDK-583): why is license finder unable to detect this license automatically?' + :license_links: https://github.com/gonum/plot/blob/c2b63591159b9dceb2cbf953702691d2a2fe7a6d/LICENSE + :versions: [] + :when: 2022-08-15 15:56:25.026774237 Z +- - :permit + - Creative Commons Attribution 4.0 International Public License + - :who: + :why: + :versions: [] + :when: 2022-08-29 22:26:18.925886068 Z +- - :permit + - GPLv3 + - :who: + :why: + :versions: [] + :when: 2022-08-30 15:22:06.823924964 Z +- - :license + - github.com/gen2brain/malgo + - The Unlicense + - :who: + :license_links: https://github.com/gen2brain/malgo/blob/6af716cf2273f0675789cc1366977970e31b2239/LICENSE + :versions: [] + :when: 2022-08-30 15:37:02.011437856 Z +- - :license + - github.com/goburrow/modbus + - New BSD + - :who: + :why: https://github.com/goburrow/modbus/blob/606c02f4eef527a1d4cf7d8733d5fd7ba34f91d8/LICENSE + :versions: [] + :when: 2022-09-14 16:27:17.872831000 Z +- - :approve + - github.com/ziutek/mymysql + - :who: + :why: license language is compatible with AGPL + :versions: [] + :when: 2022-09-14 16:27:17.872831000 Z + :license_links: https://github.com/ziutek/mymysql/blob/fffb8880277462abe6f4526dbd69a1982f9437b6/LICENSE +- - :license + - github.com/golang/freetype + - GPLv2+ + - :who: + :why: we are allowed to choose one of two licenses (freetype or GPL version 2 + or higher) - we are choosing the latter + :versions: [] + :when: 2022-08-30 16:08:52.919938114 Z + :license_links: https://github.com/golang/freetype/blob/e2365dfdc4a05e4b8299a783240d4a7d5a65d4e4/LICENSE +- - :permit + - The Unlicense + - :who: + :why: + :versions: [] + :when: 2022-08-30 16:12:12.044846522 Z + :license_links: https://unlicense.org +- - :license + - github.com/gonum/blas + - New BSD + - :who: + :why: 'TODO(RSDK-582): this library is deprecated but still an indirect dependency + to RDK' + :license_links: https://github.com/gonum/license/blob/59758bd3db1383fa1f02f88eceee1f8568a87039/LICENSE + :versions: [] + :when: 2022-08-30 16:24:12.727870628 Z +- - :license + - github.com/gonum/lapack + - New BSD + - :who: + :why: 'TODO(RSDK-582): this library is deprecated but still an indirect dependency + to RDK' + :license_links: https://github.com/gonum/license/blob/59758bd3db1383fa1f02f88eceee1f8568a87039/LICENSE + :versions: [] + :when: 2022-08-30 16:24:20.022268639 Z +- - :license + - github.com/gonum/matrix + - New BSD + - :who: + :why: 'TODO(RSDK-582): this library is deprecated but still an indirect dependency + to RDK' + :license_links: https://github.com/gonum/license/blob/59758bd3db1383fa1f02f88eceee1f8568a87039/LICENSE + :versions: [] + :when: 2022-08-30 16:24:26.855308650 Z +- - :license + - "@viamrobotics/rpc" + - MIT + - :who: + :why: 'TODO(RSDK-583): why is license finder unable to detect this license automatically?' + :license_links: https://github.com/viamrobotics/goutils/blob/6684974ace14045e04d479777852602817e03313/LICENSE + :versions: [] + :when: 2022-08-31 20:08:14.585047144 Z +- - :approve + - github.com/viamrobotics/evdev + - :who: + :why: license language is compatible with AGPL + :license_links: https://github.com/viamrobotics/evdev/blob/5a415229fba9557cca9bfedc7ba89cb48f28fab0/LICENSE + :versions: [] + :when: 2022-08-31 20:13:08.147340927 Z +- - :permit + - GPLv2+ + - :who: + :why: + :versions: [] + :when: 2022-09-16 15:13:54.129990412 Z +- - :approve + - github.com/opencensus-integrations/gomongowrapper + - :who: + :why: + :versions: [] + :when: 2023-01-30 21:31:27.476042000 Z +- - :approve + - go.viam.com/rdk + - :who: + :why: + :versions: [] + :when: 2024-12-03 20:21:04.946556000 Z