aboutsummaryrefslogtreecommitdiffstats
path: root/CONTRIBUTING.md
blob: 9a0263e93be05e31fba2746bc13977772853524a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Contributing to Bolt

Thank you for your interest in contributing to Bolt! This document provides
guidelines and instructions for contributing to the project.

Bolt is hosted on [SourceHut](https://sr.ht/~eugenetriguba/Bolt/). If you're new
to SourceHut, see the [git.sr.ht quickstart](https://man.sr.ht/git.sr.ht/).

You do not need an account on SourceHut to contribute.

## How to Contribute

Bolt uses an [email-based workflow](https://git-send-email.io/) for
accepting contributions.

- All questions, discussions, requests, or patches should be submitted via
  email to my [public-inbox mailing list](https://lists.sr.ht/~eugenetriguba/public-inbox).
  For patches, use the subject prefix `[PATCH bolt]`. For anything else, please
  use a prefix of `[bolt]`.

## Development Setup

### Prerequisites

- Go 1.24.0 or later
- Docker (for running database integration tests)
- git

### Initial Setup

1. Clone the repository:
```bash
git clone https://git.sr.ht/~eugenetriguba/bolt
cd bolt
```

2. Install dependencies:
```bash
go mod download
```

3. Build the project:
```bash
./scripts/build.sh
```

### Running Tests

Bolt has integration tests for all supported databases. The test
suite uses docker containers to run database instances.

Run all tests:
```bash
./scripts/test.sh
```

Run all tests and leave database containers running:
```
./scripts/test.sh --keepdb
```

Run tests for a specific database:
```bash
./scripts/test.sh postgres
./scripts/test.sh mysql
./scripts/test.sh mssql
./scripts/test.sh sqlite3
```

### Running Linters/Formatters

To lint:
```bash
./scripts/lint.sh
```

To format:
```bash
./scripts/format.sh
```