Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

golangci/golangci-worker

CircleCI GolangCI

Worker

This repository contains code of queue worker. Worker runs golangci-lint and reports result to GitHub.

Development

Technologies

Go (golang), heroku, circleci, docker, redis, postgres.

Preparation

In golangci-api repo run:

docker-compose up -d

It runs postgres and redis needed for both api and worker.

How to run worker

make run_dev

How to run once on GitHub repo without changing GitHub data: commit status, comments

REPO={OWNER/NAME} PR={PULL_REQUEST_NUMBER} make test_repo_fake_github

e.g. REPO=golangci/golangci-worker PR=39 make test_repo_fake_github

How to run analysis of pull request locally

# in golangci-api repo
godotenv -f .env go run ./scripts/emulate_webhook/main.go -repo golangci/golangci-lint -pr 292 -sha 7b605d5c6f5a524e6b0a9cc12ad747222375ad54

Configuration

Configurate via .env file. Dev .env may be like this: