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

Commit 82a2bfd

Browse files
committed
fix markdownlint issues
1 parent 6d4743a commit 82a2bfd

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

README.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,83 @@
11
[![CircleCI](https://circleci.com/gh/golangci/golangci-worker.svg?style=svg&circle-token=94e0eb37b49bb5f87364a50592794eba13f0d95d)](https://circleci.com/gh/golangci/golangci-worker)
22
[![GolangCI](https://golangci.com/badges/github.com/golangci/golangci-worker.svg)](https://golangci.com)
33

4-
## Worker
4+
# Worker
5+
56
This repository contains code of queue worker. Worker runs golangci-lint and reports result to GitHub.
67

78
## Development
9+
810
### Technologies
11+
912
Go (golang), heroku, circleci, docker, redis, postgres.
1013

1114
### Preparation
15+
1216
In [golangci-api](https://github.com/golangci/golangci-api) repo run:
13-
```
17+
18+
```bash
1419
docker-compose up -d
1520
```
21+
1622
It runs postgres and redis needed for both api and worker.
1723

1824
### How to run worker
25+
1926
```bash
2027
make run_dev
2128
```
2229

2330
### How to run once on GitHub repo without changing GitHub data: commit status, comments
24-
```
31+
32+
```bash
2533
REPO={OWNER/NAME} PR={PULL_REQUEST_NUMBER} make test_repo_fake_github
2634
```
2735

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

3038
### Configuration
39+
3140
Configurate via `.env` file. Dev `.env` may be like this:
32-
```
41+
42+
```bash
3343
REDIS_URL="redis://localhost:6379"
3444
API_URL="https://api.dev.golangci.com"
3545
WEB_ROOT="https://dev.golangci.com"
3646
USE_DOCKER_EXECUTOR=1
3747
```
3848

3949
### Executors
50+
4051
Executor is an abstraction over executing shell commands. In production we use remote shell executor (machine by ssh).
4152
For local development it's better to use docker executor:
42-
```
53+
54+
```bash
4355
docker build -t golangci_executor -f app/docker/executor.dockerfile .
4456
echo "USE_DOCKER_EXECUTOR=1" >>.env
4557
```
4658

4759
### API
60+
4861
golangci-api is not needed for running and testing golangci-worker. Not running api can just make log warnings like this:
49-
```
62+
63+
```bash
5064
level=warning msg="Can't get current state: bad status code 404"
5165
```
5266

5367
### Testing
68+
5469
To run tests:
55-
```
70+
71+
```bash
5672
make test
5773
```
5874

5975
For more realistic testing than `test_repo_fake_github` use in golangci-api repo GitHub WebHook emulator:
60-
```
76+
77+
```bash
6178
go run app/scripts/emulate_webhook/main.go --repo golangci/golangci-worker --pr 39 --sha fbd0d7bada8a6cfa7adbc58e5901e0d66f7f65b1
6279
```
6380

81+
## Contributing
6482

65-
# Contributing
6683
See [CONTRIBUTING](https://github.com/golangci/golangci-worker/blob/master/CONTRIBUTING.md).
67-

0 commit comments

Comments
 (0)