- Notifications
You must be signed in to change notification settings - Fork6
golangci/golangci-worker
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository contains code of queue worker. Worker runs golangci-lint and reports result to GitHub.
Go (golang), heroku, circleci, docker, redis, postgres.
Ingolangci-api repo run:
docker-compose up -d
It runs postgres and redis needed for both api and worker.
make run_dev
REPO={OWNER/NAME} PR={PULL_REQUEST_NUMBER} make test_repo_fake_githube.g.REPO=golangci/golangci-worker PR=39 make test_repo_fake_github
# in golangci-api repogodotenv -f .env go run ./scripts/emulate_webhook/main.go -repo golangci/golangci-lint -pr 292 -sha 7b605d5c6f5a524e6b0a9cc12ad747222375ad54Configurate via.env file. Dev.env may be like this:
REDIS_URL="redis://localhost:6379"API_URL="https://api.dev.golangci.com"WEB_ROOT="https://dev.golangci.com"USE_CONTAINER_EXECUTOR_PERCENT=100USE_NEW_REPO_ANALYSIS_PERCENT=100ORCHESTRATOR_ADDR="http://127.0.0.1:8001"ORCHESTRATOR_TOKEN=secret_token
Executor is an abstration allowing to run arbitrary shell commands.We support following executor types:
- shell - runs commands on a local machine
- remote shell - runs commands on the specified remote host; it's currently the primary executor
- container - runs commands by sending them to containers orchestrator; containers orchestrator runs container for executing commands; currently we migrate to this executor type.
The recommended way to run executors during development:
# in golangci-api repoTOKEN=secret_token go run ./cmd/containers_orchestrator/main.gogolangci-api is not needed for running and testing golangci-worker. Not running api can just make log warnings like this:
level=warning msg="Can't get current state: bad status code 404"To run tests:
maketestFor more realistic testing thantest_repo_fake_github use in golangci-api repo GitHub WebHook emulator:
go run app/scripts/emulate_webhook/main.go --repo golangci/golangci-worker --pr 39 --sha fbd0d7bada8a6cfa7adbc58e5901e0d66f7f65b1
SeeCONTRIBUTING.
About
Queue worker of GolangCI
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.