diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build.yml | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 070350a0..f69d672a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,12 +3,18 @@ name: build on: push: pull_request: + branches: + # Branches from forks have the form 'user:branch-name' so we only run + # this job on pull_request events for branches that look like fork + # branches. Without this we would end up running this job twice for non + # forked PRs, once for the push and then once for opening the PR. + - '**:**' jobs: golang: name: Build (Go ${{ matrix.go }}, PHP ${{ matrix.php }}, OS ${{matrix.os}}) runs-on: ${{ matrix.os }} - timeout-minutes: 15 + timeout-minutes: 20 strategy: fail-fast: false matrix: @@ -96,6 +102,7 @@ jobs: go test -v -race -cover -tags=debug -coverprofile=./coverage-ci/static_root.txt -covermode=atomic ./plugins/static go test -v -race -cover -tags=debug -coverprofile=./coverage-ci/headers.txt -covermode=atomic ./plugins/headers/tests go test -v -race -cover -tags=debug -coverprofile=./coverage-ci/checker.txt -covermode=atomic ./plugins/checker/tests + go test -v -race -cover -tags=debug -coverprofile=./coverage-ci/reload.txt -covermode=atomic ./plugins/reload/tests cat ./coverage-ci/*.txt > ./coverage-ci/summary.txt - uses: codecov/codecov-action@v1 # Docs: <https://github.com/codecov/codecov-action> @@ -105,17 +112,18 @@ jobs: file: ./coverage-ci/summary.txt fail_ci_if_error: false - golangci-check: + golangci-lint: name: Golang-CI (lint) runs-on: ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v1 + uses: actions/checkout@v2 - - name: golangci-lint - uses: reviewdog/action-golangci-lint@v1 # action page: <https://github.com/reviewdog/action-golangci-lint> + - name: Run linter + uses: golangci/golangci-lint-action@v2 # Action page: <https://github.com/golangci/golangci-lint-action> with: - github_token: ${{ secrets.github_token }} + version: v1.33 # without patch version + only-new-issues: false # show only new issues if it's a pull request # image: # name: Build docker image |