Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Mar 21, 2024
1 parent c0eb333 commit 92c2b93
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions testdata/example/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module "github.com/k1LoW/gostyle-action/testdata/example"
15 changes: 15 additions & 0 deletions testdata/example/main.go
Original file line number Diff line number Diff line change
@@ -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")
}

0 comments on commit 92c2b93

Please sign in to comment.