diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..131b6fe --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: test + +on: + push: + branches: + - main + pull_request: + +jobs: + test: + name: Test + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Check out source code + uses: actions/checkout@v4 + + - name: Set up Go + id: setup-go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true + + - name: Run gostyle + uses: ./ + with: + work-dir: ./testdata/example + reviewdog-filter-mode: nofilter + reviewdog-reporter: github-pr-check diff --git a/testdata/example/go.mod b/testdata/example/go.mod new file mode 100644 index 0000000..2ee12d7 --- /dev/null +++ b/testdata/example/go.mod @@ -0,0 +1 @@ +module "github.com/k1LoW/gostyle-action/testdata/example" diff --git a/testdata/example/main.go b/testdata/example/main.go new file mode 100644 index 0000000..24f9d56 --- /dev/null +++ b/testdata/example/main.go @@ -0,0 +1,15 @@ +package main + +import "fmt" + +type Query interface { // want "gostyle.ifacenames" + Do() error +} + +type Getter interface { + GetSomething() // want "gostyle.getters" +} + +func main() { + fmt.Println("hello") +}