Skip to content

Commit

Permalink
Basic setup
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jan 10, 2024
1 parent 94e917d commit 442aade
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 55 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,35 @@ jobs:
matrix:
go-version: [1.20.x, 1.21.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
package: [passthrough]
runs-on: ${{ matrix.platform }}
defaults:
run:
shell: bash
steps:
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: false
- name: Install staticcheck
if: matrix.platform == 'ubuntu-latest'
run: go install honnef.co/go/tools/cmd/staticcheck@latest
shell: bash
- name: Install golint
run: go install golang.org/x/lint/golint@latest
shell: bash
- name: Update PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: bash
- name: Checkout code
uses: actions/checkout@v3
- name: Fmt
if: matrix.platform != 'windows-latest' # :(
if: matrix.platform != 'windows-latest'
run: "diff <(gofmt -d .) <(printf '')"
shell: bash
working-directory: ${{ matrix.package }}
- name: Vet
run: go vet ./...
working-directory: ${{ matrix.package }}
- name: Staticcheck
if: matrix.platform == 'ubuntu-latest'
run: staticcheck ./...
- name: Lint
run: golint ./...
working-directory: ${{ matrix.package }}
- name: Test
run: go test -race ./...
working-directory: ${{ matrix.package }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[![Tests on Linux, MacOS and Windows](https://github.com/bep/golibtemplate/workflows/Test/badge.svg)](https://github.com/bep/golibtemplate/actions?query=workflow:Test)
[![Go Report Card](https://goreportcard.com/badge/github.com/bep/golibtemplate)](https://goreportcard.com/report/github.com/bep/golibtemplate)
[![GoDoc](https://godoc.org/github.com/bep/golibtemplate?status.svg)](https://godoc.org/github.com/bep/golibtemplate)
[![Tests on Linux, MacOS and Windows](https://github.com/gohugoio/hugo-goldmark-extensions/workflows/Test/badge.svg)](https://github.com/gohugoio/hugo-goldmark-extensions/actions?query=workflow:Test)
[![Go Report Card](https://goreportcard.com/badge/github.com/gohugoio/hugo-goldmark-extensions)](https://goreportcard.com/report/github.com/gohugoio/hugo-goldmark-extensions)
[![GoDoc](https://godoc.org/github.com/gohugoio/hugo-goldmark-extensions?status.svg)](https://godoc.org/github.com/gohugoio/hugo-goldmark-extensions)
12 changes: 0 additions & 12 deletions go.mod

This file was deleted.

28 changes: 0 additions & 28 deletions go.sum

This file was deleted.

12 changes: 12 additions & 0 deletions passthrough/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module github.com/gohugoio/hugo-goldmark-extensions/passthrough

go 1.20

require github.com/frankban/quicktest v1.14.6

require (
github.com/google/go-cmp v0.5.9 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
)
12 changes: 12 additions & 0 deletions passthrough/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
2 changes: 1 addition & 1 deletion lib.go → passthrough/passthrough.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golibtemplate
package passthrough

// Foo returns a string.
func Foo() string {
Expand Down
2 changes: 1 addition & 1 deletion lib_test.go → passthrough/passthrough_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package golibtemplate
package passthrough

import (
"testing"
Expand Down

0 comments on commit 442aade

Please sign in to comment.