1313  MONGODB_TEST_OUTPUT_URI : ${{ secrets.MONGODB_TEST_OUTPUT_URI }} 
1414
1515jobs :
16-   test_go :
17-     #  note: we have automations that match on platform_name. be careful changing this.
18-     name : ${{ matrix.platform_name }} Go Unit Tests 
19-     strategy :
20-       fail-fast : false 
21-       matrix :
22-         include :
23-           - arch : ubuntu-large 
24-             image : ghcr.io/viamrobotics/rdk-devenv:amd64-cache 
25-             platform : linux/amd64 
26-             platform_name : linux-amd64 
27-           - arch : ubuntu-large-arm 
28-             image : ghcr.io/viamrobotics/rdk-devenv:arm64-cache 
29-             platform : linux/arm64 
30-             platform_name : linux-arm64 
31-     runs-on : ${{ matrix.arch }} 
32-     container :
33-       image : ${{ matrix.image }} 
34-       options : --platform ${{ matrix.platform }} 
35-     timeout-minutes : 30 
36- 
37-     steps :
38-       - uses : actions/checkout@v3 
39-         with :
40-           ref : ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.event.ref }} 
41- 
42-       - name : Set main env vars 
43-         if : github.event_name != 'pull_request_target' 
44-         run : | 
45-           echo "GITHUB_X_HEAD_SHA=${GITHUB_SHA}" >> $GITHUB_ENV 
46-           echo "GITHUB_X_HEAD_REF=${GITHUB_REF_NAME}" >> $GITHUB_ENV 
47- 
48-        - name : Set PR env vars 
49-         if : github.event_name == 'pull_request_target' 
50-         env :
51-           GITHUB_HEAD_REF_SAN : ${{ github.event.pull_request.head.label }} 
52-         run : | 
53-           echo "GITHUB_X_HEAD_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV 
54-           echo "GITHUB_X_HEAD_REF=${GITHUB_HEAD_REF_SAN}" >> $GITHUB_ENV 
55-           echo "GITHUB_X_PR_BASE_SHA=${{ github.event.pull_request.base.sha }}" >> $GITHUB_ENV 
56-           echo "GITHUB_X_PR_BASE_REF=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV 
57- 
58-        - name : Chown 
59-         run : chown -R testbot:testbot . 
60- 
61-       - name : Run CLI linter tests 
62-         run : | 
63-           cd cli/internal/cli_lint 
64-           go build . 
65-           ./cli_lint ../../ 
66- 
67-        - name : Verify no uncommitted changes from "make build-go lint-go generate-go" 
68-         run : | 
69-           sudo -Hu testbot bash -lc 'git init && git add . && make build-go lint-go generate-go' 
70-           GEN_DIFF=$(git status -s) 
71-           if [ -n "$GEN_DIFF" ]; then 
72-               echo '"make build-go lint-go generate-go" resulted in the following untracked changes:' 1>&2 
73-               git diff 
74-               echo '"make build-go lint-go generate-go" resulted in changes not in git' 1>&2 
75-               git status 
76-               exit 1 
77-           fi 
78- 
79-        - name : Run go unit tests 
80-         run : | 
81-           chmod -R a+rwx . # temporary fix for arm runners 
82-           sudo apt-get update && sudo apt-get install -y python3-venv 
83-           sudo --preserve-env=MONGODB_TEST_OUTPUT_URI,GITHUB_SHA,GITHUB_RUN_ID,GITHUB_RUN_NUMBER,GITHUB_RUN_ATTEMPT,GITHUB_X_PR_BASE_SHA,GITHUB_X_PR_BASE_REF,GITHUB_X_HEAD_REF,GITHUB_X_HEAD_SHA,GITHUB_REPOSITORY -Hu testbot bash -lc 'make test-go' 
84- 
85-        - name : Upload test.json 
86-         if : always() 
87-         uses : actions/upload-artifact@v4 
88-         with :
89-           name : test-${{ matrix.platform_name }}.json 
90-           path : json.log 
91-           retention-days : 30 
16+   #   test_go:
17+   #     # note: we have automations that match on platform_name. be careful changing this.
18+   #     name: ${{ matrix.platform_name }} Go Unit Tests
19+   #     strategy:
20+   #       fail-fast: false
21+   #       matrix:
22+   #         include:
23+   #           - arch: ubuntu-large
24+   #             image: ghcr.io/viamrobotics/rdk-devenv:amd64-cache
25+   #             platform: linux/amd64
26+   #             platform_name: linux-amd64
27+   #           - arch: ubuntu-large-arm
28+   #             image: ghcr.io/viamrobotics/rdk-devenv:arm64-cache
29+   #             platform: linux/arm64
30+   #             platform_name: linux-arm64
31+   #     runs-on: ${{ matrix.arch }}
32+   #     container:
33+   #       image: ${{ matrix.image }}
34+   #       options: --platform ${{ matrix.platform }}
35+   #     timeout-minutes: 30
36+ 
37+   #     steps:
38+   #       - uses: actions/checkout@v3
39+   #         with:
40+   #           ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.event.ref }}
41+ 
42+   #       - name: Set main env vars
43+   #         if: github.event_name != 'pull_request_target'
44+   #         run: |
45+   #           echo "GITHUB_X_HEAD_SHA=${GITHUB_SHA}" >> $GITHUB_ENV
46+   #           echo "GITHUB_X_HEAD_REF=${GITHUB_REF_NAME}" >> $GITHUB_ENV
47+ 
48+   #       - name: Set PR env vars
49+   #         if: github.event_name == 'pull_request_target'
50+   #         env:
51+   #           GITHUB_HEAD_REF_SAN: ${{ github.event.pull_request.head.label }}
52+   #         run: |
53+   #           echo "GITHUB_X_HEAD_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
54+   #           echo "GITHUB_X_HEAD_REF=${GITHUB_HEAD_REF_SAN}" >> $GITHUB_ENV
55+   #           echo "GITHUB_X_PR_BASE_SHA=${{ github.event.pull_request.base.sha }}" >> $GITHUB_ENV
56+   #           echo "GITHUB_X_PR_BASE_REF=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
57+ 
58+   #       - name: Chown
59+   #         run: chown -R testbot:testbot .
60+ 
61+   #       - name: Run CLI linter tests
62+   #         run: |
63+   #           cd cli/internal/cli_lint
64+   #           go build .
65+   #           ./cli_lint ../../
66+ 
67+   #       - name: Verify no uncommitted changes from "make build-go lint-go generate-go"
68+   #         run: |
69+   #           sudo -Hu testbot bash -lc 'git init && git add . && make build-go lint-go generate-go'
70+   #           GEN_DIFF=$(git status -s)
71+   #           if [ -n "$GEN_DIFF" ]; then
72+   #               echo '"make build-go lint-go generate-go" resulted in the following untracked changes:' 1>&2
73+   #               git diff
74+   #               echo '"make build-go lint-go generate-go" resulted in changes not in git' 1>&2
75+   #               git status
76+   #               exit 1
77+   #           fi
78+ 
79+   #       - name: Run go unit tests
80+   #         run: |
81+   #           chmod -R a+rwx . # temporary fix for arm runners
82+   #           sudo apt-get update && sudo apt-get install -y python3-venv
83+   #           sudo --preserve-env=MONGODB_TEST_OUTPUT_URI,GITHUB_SHA,GITHUB_RUN_ID,GITHUB_RUN_NUMBER,GITHUB_RUN_ATTEMPT,GITHUB_X_PR_BASE_SHA,GITHUB_X_PR_BASE_REF,GITHUB_X_HEAD_REF,GITHUB_X_HEAD_SHA,GITHUB_REPOSITORY -Hu testbot bash -lc 'make test-go'
84+ 
85+   #       - name: Upload test.json
86+   #         if: always()
87+   #         uses: actions/upload-artifact@v4
88+   #         with:
89+   #           name: test-${{ matrix.platform_name }}.json
90+   #           path: json.log
91+   #           retention-days: 30
9292
9393  test_win :
9494    name : windows 
@@ -105,7 +105,7 @@ jobs:
105105        GOFLAGS : " -tags=no_cgo" 
106106      run :
107107        #  note: this is a subset of tests that are known to pass on windows
108-         go run gotest.tools/gotestsum --format standard-verbose --jsonfile json.log ./module ./logging/...  
108+         go run gotest.tools/gotestsum --format standard-verbose --jsonfile json.log ./web/server -run TestModulesRespondToDebugAndLogChanges -timeout 1m  
109109
110110    - name : Upload test.json 
111111      if : always() 
@@ -115,79 +115,79 @@ jobs:
115115        path : json.log 
116116        retention-days : 30 
117117
118-   test32 :
119-     name : Go 32-bit Unit Tests 
120-     runs-on : ubuntu-large-arm 
121-     timeout-minutes : 30 
122- 
123-     steps :
124-       - uses : actions/checkout@v3 
125-         with :
126-           ref : ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }} 
127- 
128-       - uses : docker/login-action@v2 
129-         with :
130-           username : viambuild 
131-           password : ${{ secrets.DOCKER_PUBLIC_READONLY_PAT }} 
132-       - uses : docker/setup-qemu-action@v3 
133-       - uses : docker/setup-buildx-action@v3 
134- 
135-       - name : Run go unit tests 
136-         run : | 
137-           chmod -R a+rwx . # temporary fix for arm runners 
138-           docker run \ 
139-             --platform linux/arm/v7 \ 
140-             -v `pwd`:/rdk \ 
141-             ghcr.io/viamrobotics/rdk-devenv:armhf-cache \ 
142-             sudo -Hu testbot bash -lc 'sudo apt-get update && sudo apt-get install -y python3-venv && cd /rdk && go test -v ./...' 
143- 
144-    motion_tests :
145-     name : Test Longer-running Motion Plans if affected 
146-     uses : viamrobotics/rdk/.github/workflows/motion-tests.yml@main 
147- 
148-   jsonschema :
149-     name : Test meta.json jsonschema 
150-     runs-on : ubuntu-latest 
151-     steps :
152-       - uses : actions/checkout@v4 
153-       - uses : actions/setup-go@v5 
154-       - uses : actions/setup-python@v5 
155-         with :
156-           cache-dependency-path : cli/test-requirements.txt 
157-       - run : | 
158-           go run -tags no_cgo ./cli/viam/ module create --local-only --name schematest --public-namespace ns 
159-           cat meta.json | jq '.models = [{"api": "x:y:z", "model": "x:y:z"}]' > meta2.json 
160-           python -m venv .venv 
161-           source .venv/bin/activate 
162-           pip install -r cli/test-requirements.txt 
163-           check-jsonschema --schemafile ./cli/module.schema.json meta2.json 
164- 
165-    test_passing :
166-     name : All Tests Passing 
167-     needs : [test_go, test32, motion_tests, test_win] 
168-     runs-on : [ubuntu-latest] 
169-     if : always() 
170-     steps :
171-       - name : Check Results 
172-         run : | 
173-           echo Go Unit Tests: ${{ needs.test_go.result }} 
174-           echo Go 32-bit Tests: ${{ needs.test32.result }} 
175-           echo Windows Tests: ${{ needs.test_win.result }} 
176-           echo Motion Tests: ${{ needs.motion_tests.result }} 
177-           [ "${{ needs.test_go.result }}" == "success" ] && \ 
178-           [ "${{ needs.test32.result }}" == "success" ] && \ 
179-           [ "${{ needs.test_win.result }}" == "success" ] && \ 
180-           [ "${{ needs.motion_tests.result }}" == "success" ] 
181- 
182-        #  Now that RDK is public, can't directly comment without token having full read/write access
183-       #  code-coverage-comment.yml will trigger seperately and post the actual comments
184-       - name : Prepare code comment 
185-         run : echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> pr.env 
186- 
187-       - name : Mark appimage label 
188-         if : contains(github.event.pull_request.labels.*.name, 'appimage') || contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests') 
189-         run : echo "APPIMAGE=true" >> pr.env 
190- 
191-       - name : Mark static label 
192-         if : contains(github.event.pull_request.labels.*.name, 'static-build') || contains(github.event.pull_request.labels.*.name, 'static-ignore-tests') 
193-         run : echo "STATIC=true" >> pr.env 
118+   #   test32:
119+   #     name: Go 32-bit Unit Tests
120+   #     runs-on: ubuntu-large-arm
121+   #     timeout-minutes: 30
122+ 
123+   #     steps:
124+   #       - uses: actions/checkout@v3
125+   #         with:
126+   #           ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }}
127+ 
128+   #       - uses: docker/login-action@v2
129+   #         with:
130+   #           username: viambuild
131+   #           password: ${{ secrets.DOCKER_PUBLIC_READONLY_PAT }}
132+   #       - uses: docker/setup-qemu-action@v3
133+   #       - uses: docker/setup-buildx-action@v3
134+ 
135+   #       - name: Run go unit tests
136+   #         run: |
137+   #           chmod -R a+rwx . # temporary fix for arm runners
138+   #           docker run \
139+   #             --platform linux/arm/v7 \
140+   #             -v `pwd`:/rdk \
141+   #             ghcr.io/viamrobotics/rdk-devenv:armhf-cache \
142+   #             sudo -Hu testbot bash -lc 'sudo apt-get update && sudo apt-get install -y python3-venv && cd /rdk && go test -v ./...'
143+ 
144+   #   motion_tests:
145+   #     name: Test Longer-running Motion Plans if affected
146+   #     uses: viamrobotics/rdk/.github/workflows/motion-tests.yml@main
147+ 
148+   #   jsonschema:
149+   #     name: Test meta.json jsonschema
150+   #     runs-on: ubuntu-latest
151+   #     steps:
152+   #       - uses: actions/checkout@v4
153+   #       - uses: actions/setup-go@v5
154+   #       - uses: actions/setup-python@v5
155+   #         with:
156+   #           cache-dependency-path: cli/test-requirements.txt
157+   #       - run: |
158+   #           go run -tags no_cgo ./cli/viam/ module create --local-only --name schematest --public-namespace ns
159+   #           cat meta.json | jq '.models = [{"api": "x:y:z", "model": "x:y:z"}]' > meta2.json
160+   #           python -m venv .venv
161+   #           source .venv/bin/activate
162+   #           pip install -r cli/test-requirements.txt
163+   #           check-jsonschema --schemafile ./cli/module.schema.json meta2.json
164+ 
165+   #   test_passing:
166+   #     name: All Tests Passing
167+   #     needs: [test_go, test32, motion_tests, test_win]
168+   #     runs-on: [ubuntu-latest]
169+   #     if: always()
170+   #     steps:
171+   #       - name: Check Results
172+   #         run: |
173+   #           echo Go Unit Tests: ${{ needs.test_go.result }}
174+   #           echo Go 32-bit Tests: ${{ needs.test32.result }}
175+   #           echo Windows Tests: ${{ needs.test_win.result }}
176+   #           echo Motion Tests: ${{ needs.motion_tests.result }}
177+   #           [ "${{ needs.test_go.result }}" == "success" ] && \
178+   #           [ "${{ needs.test32.result }}" == "success" ] && \
179+   #           [ "${{ needs.test_win.result }}" == "success" ] && \
180+   #           [ "${{ needs.motion_tests.result }}" == "success" ]
181+ 
182+   #       # Now that RDK is public, can't directly comment without token having full read/write access
183+   #       # code-coverage-comment.yml will trigger seperately and post the actual comments
184+   #       - name: Prepare code comment
185+   #         run: echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> pr.env
186+ 
187+   #       - name: Mark appimage label
188+   #         if: contains(github.event.pull_request.labels.*.name, 'appimage') || contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests')
189+   #         run: echo "APPIMAGE=true" >> pr.env
190+ 
191+   #       - name: Mark static label
192+   #         if: contains(github.event.pull_request.labels.*.name, 'static-build') || contains(github.event.pull_request.labels.*.name, 'static-ignore-tests')
193+   #         run: echo "STATIC=true" >> pr.env
0 commit comments