From 3748d5650e999f4dcff2b1411be814bd4eab7a91 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Sun, 21 Jun 2026 11:15:44 +0200 Subject: [PATCH] Add CI via github actions Same as for devd (by @chebread) --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 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..b91944b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + name: Go 1.26 on ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: "1.26.x" + + - 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 + go vet ./... + + - name: Install + run: go install ./cmd/modd + + - name: Test + run: | + go test -v -race ./... + go run ./cmd/modd --help