diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..55a3458 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,17 @@ +## PHP Version + +// The version on which the error is reproduced. + +## Code Example + +```php +// your code here +``` + +## Actual Behavior + +// Example of incorrect error + +## Expected Behavior + +// Description of what you expected diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..78df938 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,21 @@ +# This file adheres to the YAML5 style. +{ + name: "Go", + on: ["push", "pull_request"], + jobs: { + build: { + name: "Build", + "runs-on": "ubuntu-latest", + steps: [ + { + name: "Set up Go 1.16", + uses: "actions/setup-go@v1", + "with": {"go-version": 1.16}, + id: "go", + }, + {name: "Check out code into the Go module directory", uses: "actions/checkout@v1"}, + {name: "Tests", run: "make test"}, + ], + }, + }, +} diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md deleted file mode 100644 index 8b13789..0000000 --- a/ISSUE_TEMPLATE.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Makefile b/Makefile index 856785c..1f500c7 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ build: go build ./cmd/... test: - go test ./... + go test -v ./... cover: go test ./... --cover diff --git a/README.md b/README.md index f8c065c..f95cbda 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ PHP Parser written in Go PHP Parser written in Go [![GoDoc](https://godoc.org/github.com/VKCOM/php-parser?status.svg)](https://godoc.org/github.com/VKCOM/php-parser) -[![Build Status](https://travis-ci.org/z7zmey/php-parser.svg?branch=master)](https://travis-ci.org/z7zmey/php-parser) +[![Build Status](https://github.com/VKCOM/php-parser/workflows/Go/badge.svg)](https://github.com/VKCOM/php-parser/workflows/Go) [![Go Report Card](https://goreportcard.com/badge/github.com/VKCOM/php-parser)](https://goreportcard.com/report/github.com/VKCOM/php-parser) This project uses [goyacc](https://godoc.org/golang.org/x/tools/cmd/goyacc) and [ragel](https://www.colm.net/open-source/ragel/) tools to create PHP parser. It parses source code into [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree). It can be used to write static analysis, refactoring, metrics, code style formatting tools.