Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.0 release #158

Merged
merged 5 commits into from
Jun 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributing to Fluent's PostgreSQL Driver

👋 Welcome to the Vapor team!

## Docker

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:

```sh
docker-compose up
```

This will start the two databases required for running this package's unit tests.

## Xcode

To open the project in Xcode:

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

To test within Xcode, press `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! 🙌
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github: [tanner0101] # loganwright, joscdk
github: [tanner0101]
open_collective: vapor
31 changes: 11 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,39 +30,29 @@ jobs:
- postgres:11
- postgres:12
- postgres:13
include:
- depscmd: 'apt-get -q update && apt-get -q install -y postgresql-client'
- image: swiftlang/swift:nightly-master-centos8
depscmd: 'dnf install -y postgresql'
- image: swiftlang/swift:nightly-master-amazonlinux2
depscmd: 'yum install -y postgresql'
container: ${{ matrix.image }}
services:
postgres-a:
image: ${{ matrix.dbimage }}
env: { POSTGRES_USER: vapor_username, POSTGRES_PASSWORD: vapor_password, POSTGRES_DB: vapor_database }
env:
POSTGRES_USER: vapor_username
POSTGRES_PASSWORD: vapor_password
POSTGRES_DB: vapor_database
postgres-b:
image: ${{ matrix.dbimage }}
env: { POSTGRES_USER: vapor_username, POSTGRES_PASSWORD: vapor_password, POSTGRES_DB: vapor_database }
env:
POSTGRES_USER: vapor_username
POSTGRES_PASSWORD: vapor_password
POSTGRES_DB: vapor_database
env:
POSTGRES_HOSTNAME_A: postgres-a
POSTGRES_HOSTNAME_B: postgres-b
PGUSER: vapor_username
PGPASSWORD: vapor_password
LOG_LEVEL: info
steps:
- name: Install dependencies
run: ${{ matrix.depscmd }}
- name: Compensate for AmazonLinux2's Postgres
if: ${{ endsWith(matrix.image, 'amazonlinux2') }}
run: printf '#!/bin/bash\nexec psql "$@" </dev/null\n' >/usr/bin/pg_isready && chmod 0755 /usr/bin/pg_isready
- name: Wait for database servers to be ready
run: until pg_isready -hpostgres-a -dvapor_database && pg_isready -hpostgres-b -dvapor_database; do sleep 1; done
timeout-minutes: 2
- name: Checkout code
uses: actions/checkout@v2
- name: Run tests with Thread Sanitizer
run: swift test --enable-test-discovery --sanitize=thread

macOS:
strategy:
fail-fast: false
Expand All @@ -79,7 +69,8 @@ jobs:
steps:
- name: Select latest available Xcode
uses: maxim-lobanov/[email protected]
with: { 'xcode-version': 'latest' }
with:
xcode-version: latest
- name: Replace Postgres install and start server
run: |
brew uninstall --force postgresql php && rm -rf /usr/local/{etc,var}/{postgres,pg}*
Expand Down
37 changes: 0 additions & 37 deletions CONTRIBUTING.md

This file was deleted.

2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let package = Package(
.library(name: "FluentPostgresDriver", targets: ["FluentPostgresDriver"]),
],
dependencies: [
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.0.0-rc.2.7"),
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.0.0"),
.package(url: "https://github.com/vapor/postgres-kit.git", from: "2.0.0"),
],
targets: [
Expand Down
8 changes: 0 additions & 8 deletions contribute_boostrap.sh

This file was deleted.

25 changes: 4 additions & 21 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,19 @@
version: '3'

services:
psql-11-a:
image: postgres:11
a:
image: postgres
environment:
POSTGRES_USER: vapor_username
POSTGRES_DB: vapor_database
POSTGRES_PASSWORD: vapor_password
ports:
- 5432:5432
psql-11-b:
image: postgres:11
b:
image: postgres
environment:
POSTGRES_USER: vapor_username
POSTGRES_DB: vapor_database
POSTGRES_PASSWORD: vapor_password
ports:
- 5433:5432
psql-10:
image: postgres:10
environment:
POSTGRES_USER: vapor_username
POSTGRES_DB: vapor_database
POSTGRES_PASSWORD: vapor_password
ports:
- 5432:5432
psql-9:
image: postgres:9
environment:
POSTGRES_USER: vapor_username
POSTGRES_DB: vapor_database
POSTGRES_PASSWORD: vapor_password
ports:
- 5432:5432

7 changes: 0 additions & 7 deletions test.Dockerfile

This file was deleted.