mirror of
https://github.com/lukaszraczylo/harness-sync.git
synced 2026-10-12 00:45:22 +00:00
chore: LICENSE, CI workflow, gitignore hygiene, makefile targets
This commit is contained in:
@@ -0,0 +1,37 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '1.22'
|
||||||
|
cache: true
|
||||||
|
- name: vet
|
||||||
|
run: go vet ./...
|
||||||
|
- name: build
|
||||||
|
run: go build ./...
|
||||||
|
- name: test
|
||||||
|
run: go test -race -count=1 ./...
|
||||||
|
|
||||||
|
lint:
|
||||||
|
name: lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '1.22'
|
||||||
|
cache: true
|
||||||
|
- uses: golangci/golangci-lint-action@v6
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
+8
-1
@@ -4,6 +4,10 @@
|
|||||||
*.test
|
*.test
|
||||||
*.out
|
*.out
|
||||||
|
|
||||||
|
# coverage
|
||||||
|
coverage.out
|
||||||
|
coverage.html
|
||||||
|
|
||||||
# go
|
# go
|
||||||
/vendor/
|
/vendor/
|
||||||
|
|
||||||
@@ -13,4 +17,7 @@
|
|||||||
*.swp
|
*.swp
|
||||||
|
|
||||||
# os
|
# os
|
||||||
.DS_Store
|
**/.DS_Store
|
||||||
|
|
||||||
|
# user backups created during testing
|
||||||
|
*.bak*-*
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Lukasz Raczylo
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
.PHONY: build test lint clean install
|
.PHONY: build test lint test-race cover tidy clean install
|
||||||
|
|
||||||
BIN := harness-sync
|
BIN := harness-sync
|
||||||
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
|
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
|
||||||
@@ -11,7 +11,19 @@ test:
|
|||||||
go test ./...
|
go test ./...
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
go vet ./...
|
golangci-lint run ./...
|
||||||
|
|
||||||
|
test-race:
|
||||||
|
go test -race -count=1 ./...
|
||||||
|
|
||||||
|
cover:
|
||||||
|
go test -coverprofile=coverage.out ./...
|
||||||
|
go tool cover -html=coverage.out -o coverage.html
|
||||||
|
@echo "open coverage.html"
|
||||||
|
|
||||||
|
tidy:
|
||||||
|
go mod tidy
|
||||||
|
gofmt -s -w .
|
||||||
|
|
||||||
install: build
|
install: build
|
||||||
install -m 0755 $(BIN) $$HOME/.local/bin/$(BIN)
|
install -m 0755 $(BIN) $$HOME/.local/bin/$(BIN)
|
||||||
|
|||||||
Reference in New Issue
Block a user