From 6d76815c1995a69c3003522b9ec4775fa655e157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=82=A4=E3=83=8E=E3=83=AB?= Date: Tue, 14 Jul 2026 19:01:10 -0600 Subject: [PATCH 1/2] ci: add GitHub Actions workflow for vet, race tests, and coverage --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7cf8aa9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: false + + - name: Format + run: test -z "$(gofmt -l .)" + + - name: Vet + run: go vet ./... + + - name: Test + run: go test -race -count=1 ./... + + - name: Coverage + run: | + go test -count=1 -covermode=atomic \ + -coverpkg=github.com/MY-RV/goxdi/internal/container,github.com/MY-RV/goxdi \ + -coverprofile=coverage.out ./... + total="$(go tool cover -func=coverage.out | awk '/total:/ {print $NF}')" + echo "coverage total: ${total}" + test "${total}" = "100.0%" From 3b323a4f72e209be36de6900b9bda121b1337408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=82=A4=E3=83=8E=E3=83=AB?= Date: Tue, 14 Jul 2026 19:04:14 -0600 Subject: [PATCH 2/2] fix: require Go 1.24 for generic type aliases --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index b6bc702..a5d0116 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/MY-RV/goxdi -go 1.23.3 +go 1.24