File tree 2 files changed +41
-0
lines changed 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 40
40
gomod : ${{ steps.filter.outputs.gomod }}
41
41
offlinedocs-only : ${{ steps.filter.outputs.offlinedocs_count == steps.filter.outputs.all_count }}
42
42
offlinedocs : ${{ steps.filter.outputs.offlinedocs }}
43
+ tailnet-integration : ${{ steps.filter.outputs.tailnet-integration }}
43
44
steps :
44
45
- name : Checkout
45
46
uses : actions/checkout@v4
@@ -107,6 +108,10 @@ jobs:
107
108
- ".github/workflows/ci.yaml"
108
109
offlinedocs:
109
110
- "offlinedocs/**"
111
+ tailnet-integration:
112
+ - "tailnet/**"
113
+ - "go.mod"
114
+ - "go.sum"
110
115
111
116
- id : debug
112
117
run : |
@@ -384,6 +389,30 @@ jobs:
384
389
with :
385
390
api-key : ${{ secrets.DATADOG_API_KEY }}
386
391
392
+ # Tailnet integration tests only run when the `tailnet` directory or `go.sum`
393
+ # and `go.mod` are changed. These tests are to ensure we don't add regressions
394
+ # to tailnet, either due to our code or due to updating dependencies.
395
+ #
396
+ # These tests are skipped in the main go test jobs because they require root
397
+ # and mess with networking.
398
+ test-go-tailnet-integration :
399
+ runs-on : ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
400
+ needs : changes
401
+ # Unnecessary to run on main for now
402
+ if : needs.changes.outputs.tailnet-integration == 'true' || needs.changes.outputs.ci == 'true'
403
+ timeout-minutes : 20
404
+ steps :
405
+ - name : Checkout
406
+ uses : actions/checkout@v4
407
+ with :
408
+ fetch-depth : 1
409
+
410
+ - name : Setup Go
411
+ uses : ./.github/actions/setup-go
412
+
413
+ - name : Run Tests
414
+ run : make test-tailnet-integration
415
+
387
416
test-js :
388
417
runs-on : ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
389
418
needs : changes
Original file line number Diff line number Diff line change @@ -827,6 +827,18 @@ test-race:
827
827
gotestsum --junitfile=" gotests.xml" -- -race -count=1 ./...
828
828
.PHONY : test-race
829
829
830
+ test-tailnet-integration :
831
+ env \
832
+ CODER_TAILNET_TESTS=true \
833
+ CODER_MAGICSOCK_DEBUG_LOGGING=true \
834
+ TS_DEBUG_NETCHECK=true \
835
+ GOTRACEBACK=single \
836
+ go test \
837
+ -exec " sudo -E" \
838
+ -timeout=5m \
839
+ -count=1 \
840
+ ./tailnet/test/integration
841
+
830
842
# Note: we used to add this to the test target, but it's not necessary and we can
831
843
# achieve the desired result by specifying -count=1 in the go test invocation
832
844
# instead. Keeping it here for convenience.
You can’t perform that action at this time.
0 commit comments