diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5fcc0f1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: Go + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + - name: Install Dependencies + run: | + go get . + go get -u golang.org/x/lint/golint + - name: Check Format + run: + declare -r diff="$(gofmt -l .)" + echo "${diff}" + test -z "${diff}" + - name: Lint + run: go vet + - name: Build + run: go build -v ./... + - name: Test + run: go test