Skip to content

Commit

Permalink
add contributing.md (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner0101 authored Jul 29, 2020
1 parent 5cbbc16 commit 699e164
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Contributing to Fluent's MySQL Driver

👋 Welcome to the Vapor team!

## Database

In order to build and test against Postgres, you will need a database running. The easiest way to do this is using Docker and the included `docker-compose.yml` file.

If you have Docker installed on your computer, all you will need to do is:

```fish
docker-compose mysql-a mysql-b
# or for mariadb
docker-compose mariadb-a mariadb-b
```

This will start the two databases required for running this package's unit tests. One of the databases will run on MySQL's default port 3306 and the other on 3307.

### Environment Variables

You will need to set the following environment variable to run the tests:

```
MYSQL_PORT_B=3307
```

This tells the tests that the second database is running on a different port.

You may also set the log level variable to increase or decrease logging:

```
LOG_LEVEL=notice
```

In Xcode, edit the `fluent-mysql-driver` scheme to add env variables. In the terminal, use `export`.

## Xcode

To open the project in Xcode:

- Clone the repo to your computer
- Drag and drop the folder onto Xcode

You can then run the unit tests in Xcode by pressing `CMD+U`.

## SPM

To develop using SPM, open the code in your favorite code editor. Use the following commands from within the project's root folder to build and test.

```sh
swift build
swift test
```

## SemVer

Vapor follows [SemVer](https://semver.org). This means that any changes to the source code that can cause
existing code to stop compiling _must_ wait until the next major version to be included.

Code that is only additive and will not break any existing code can be included in the next minor release.

----------

Join us on Discord if you have any questions: [vapor.team](http://vapor.team).

— Thanks! 🙌

0 comments on commit 699e164

Please sign in to comment.