diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f40634e..442a4b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,16 +1,30 @@ -name: CI on: push: - branches: [ "main" ] + branches: + - master + - main pull_request: - branches: [ "main" ] - workflow_dispatch: + +permissions: + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + # pull-requests: read jobs: - build: + golangci: + name: lint runs-on: windows-latest + timeout-minutes: 15 steps: - - uses: actions/checkout@v3 - - - name: Run a one-line script - run: echo "::error file=.github\workflows\test.yml,line=10,col=4::some issue (sample-linter)" + - name: Checkout code + uses: actions/checkout@v3 + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version: "1.21.x" + cache: false + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: latest + args: --timeout=12m diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..db7878f --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/surik/test-github-annotations + +go 1.21.1 diff --git a/main/main.go b/main/main.go new file mode 100644 index 0000000..30d7a78 --- /dev/null +++ b/main/main.go @@ -0,0 +1,11 @@ +package main + +import "fmt" + +func main() { + fmt.Println("Hello") +} + +func f() (*string, error) { + return nil, nil +}