-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5cbbc16
commit 699e164
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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! 🙌 |