diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3663ede --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: "go.mod" + + - name: Test + run: make build + + - name: Lint + uses: golangci/golangci-lint-action@v6 + with: + version: latest \ No newline at end of file diff --git a/.gitignore b/.gitignore index 47d114e..ded728d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ pdf/test/cache.fc +.idea/ \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a3c123b --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +test: + go test -race -v ./... + +build: download-deps tidy-deps compile test + +fmt: + gofmt -l -s -w . + +download-deps: + go mod download + +tidy-deps: + go mod tidy + +update-deps: + go get -u -t ./... + go mod tidy + +compile: + go build -v ./... diff --git a/go.sum b/go.sum index 7dc16b5..77a3e70 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,6 @@ github.com/benoitkugler/textlayout-testdata v0.1.1 h1:AvFxBxpfrQd8v55qH59mZOJOQj github.com/benoitkugler/textlayout-testdata v0.1.1/go.mod h1:i/qZl09BbUOtd7Bu/W1CAubRwTWrEXWq6JwMkw8wYxo= github.com/benoitkugler/textprocessing v0.0.3 h1:Q2X+Z6vxuW5Bxn1R9RaNt0qcprBfpc2hEUDeTlz90Ng= github.com/benoitkugler/textprocessing v0.0.3/go.mod h1:/4bLyCf1QYywunMK3Gf89Nhb50YI/9POewqrLxWhxd4= -github.com/benoitkugler/webrender v0.0.8 h1:U+346kMSlBBUYYSZF666ErDrkQ7BDijMhA0QPEBf6tA= -github.com/benoitkugler/webrender v0.0.8/go.mod h1:9GlVnm/06qJ9FeDiaiQAHP0ksCgXuXQxkF5cL6O+s0Q= github.com/benoitkugler/webrender v0.0.9 h1:kosTM7DM1qKhTUXoKGvnrq9/EZl0dPgCE6PpPorUgDI= github.com/benoitkugler/webrender v0.0.9/go.mod h1:9GlVnm/06qJ9FeDiaiQAHP0ksCgXuXQxkF5cL6O+s0Q= github.com/go-text/typesetting v0.1.0 h1:vioSaLPYcHwPEPLT7gsjCGDCoYSbljxoHJzMnKwVvHw=