From 570d73d6e938e7c833d63458726ba1b003356bb3 Mon Sep 17 00:00:00 2001 From: chebread <83535893+chebread@users.noreply.github.com> Date: Thu, 26 Mar 2026 19:04:22 +0900 Subject: [PATCH 1/4] Switch to GitHub Actions for CI Remove broken Travis CI configuration (.travis.yml) Add GitHub Actions workflow for testing on ubuntu, macos, and windows Strictly test on Go 1.25.x to match the go.mod directive Include gofmt, go vet, and go install to ensure build integrity --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 22 --------------------- 2 files changed, 41 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7b533bc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + name: Go 1.25 on ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: "1.25.x" + + - name: Check formatting (fmt) + if: matrix.os == 'ubuntu-latest' + run: | + if [ -n "$(gofmt -l .)" ]; then + echo "Go code is not formatted. Run 'gofmt -w .'" + exit 1 + fi + + - name: Run go vet (lint) + run: go vet ./... + + - name: Install + run: go install ./cmd/devd + + - name: Test + run: | + go test -v -race ./... + go run ./cmd/devd --help diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 07d9f98..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: go - -go: - - 1.12.x - -matrix: - include: - - os: linux - - os: windows - - os: osx - osx_image: xcode11 - -install: - - go get -t -v ./... - - go install ./cmd/devd - -script: - - go test -v -race ./... - -notifications: - email: - - aldo@corte.si From a7067f555949f1ade3a95325e7c9041b3118594c Mon Sep 17 00:00:00 2001 From: chebread <83535893+chebread@users.noreply.github.com> Date: Thu, 26 Mar 2026 22:39:59 +0900 Subject: [PATCH 2/4] Run gofmt to fix formatting issues --- fileserver/fileserver.go | 2 +- fileserver/z_last_test.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fileserver/fileserver.go b/fileserver/fileserver.go index f188800..524504f 100644 --- a/fileserver/fileserver.go +++ b/fileserver/fileserver.go @@ -229,7 +229,7 @@ func localRedirect(w http.ResponseWriter, r *http.Request, newPath string) { // To use the operating system's file system implementation, // use http.Dir: // -// http.Handle("/", &fileserver.FileServer{Root: http.Dir("/tmp")}) +// http.Handle("/", &fileserver.FileServer{Root: http.Dir("/tmp")}) type FileServer struct { Version string Root http.FileSystem diff --git a/fileserver/z_last_test.go b/fileserver/z_last_test.go index 2ca2a93..ed5b0fc 100644 --- a/fileserver/z_last_test.go +++ b/fileserver/z_last_test.go @@ -46,12 +46,12 @@ func afterTest(t *testing.T) { } var bad string badSubstring := map[string]string{ - ").readLoop(": "a Transport", - ").writeLoop(": "a Transport", + ").readLoop(": "a Transport", + ").writeLoop(": "a Transport", "created by net/http/httptest.(*Server).Start": "an httptest.Server", - "timeoutHandler": "a TimeoutHandler", - "net.(*netFD).connect(": "a timing out dial", - ").noteClientGone(": "a closenotifier sender", + "timeoutHandler": "a TimeoutHandler", + "net.(*netFD).connect(": "a timing out dial", + ").noteClientGone(": "a closenotifier sender", } var stacks string for i := 0; i < 4; i++ { From ab63df5e3f6ef641cba000623ba8986a1ec79fdd Mon Sep 17 00:00:00 2001 From: chebread <83535893+chebread@users.noreply.github.com> Date: Thu, 26 Mar 2026 22:47:58 +0900 Subject: [PATCH 3/4] Set FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 to suppress node deprecation warnings --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b533bc..03420fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,9 @@ on: pull_request: workflow_dispatch: +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + jobs: test: strategy: From af672a369fea01c5f1315002f1f6e389711f2165 Mon Sep 17 00:00:00 2001 From: chebread <83535893+chebread@users.noreply.github.com> Date: Fri, 27 Mar 2026 07:39:58 +0900 Subject: [PATCH 4/4] Combine fmt and vet steps to run only on ubuntu --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03420fc..571cf33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,16 +24,14 @@ jobs: with: go-version: "1.25.x" - - name: Check formatting (fmt) + - name: Lint if: matrix.os == 'ubuntu-latest' run: | if [ -n "$(gofmt -l .)" ]; then echo "Go code is not formatted. Run 'gofmt -w .'" exit 1 fi - - - name: Run go vet (lint) - run: go vet ./... + go vet ./... - name: Install run: go install ./cmd/devd