Browse Source

Travis support

Travis will install postgres + contrib, build and execute tests.
Docs suggest waiting for a passing build in travis for PRs.
Oliver Ferrigni 10 years ago
parent
commit
5f71ff411d
2 changed files with 20 additions and 0 deletions
  1. 16 0
      .travis.yml
  2. 4 0
      README.md

+ 16 - 0
.travis.yml

@@ -0,0 +1,16 @@
+language: erlang
+otp_release:
+  - R16B03-1
+before_script:
+  - sudo apt-get update -qq
+  - sudo apt-get install postgresql-9.3-postgis-2.1 postgresql-contrib
+addons:
+  postgresql: "9.3"
+script:
+  - sudo chmod 777 /var/run/postgresql/
+  - ./setup_test_db.sh
+  - nohup ./start_test_db.sh &
+  - sleep 1
+  - make create_testdbs
+  - make test
+

+ 4 - 0
README.md

@@ -421,6 +421,7 @@ Here's how to create a patch that's easy to integrate:
 * Create a new branch for the proposed fix.
 * Make sure it includes a test and documentation, if appropriate.
 * Open a pull request against the `devel` branch of epgsql.
+* Passing build in travis
 
 ## Test Setup
 
@@ -440,3 +441,6 @@ tests!  On Ubuntu, you can install them with a command like this:
 3. `make create_testdbs` # Creates the test database environment.
 
 4. `make test` # Runs the tests
+
+[![Build Status Master](https://travis-ci.org/epgsql/epgsql.svg?branch=master)](https://travis-ci.org/epgsql/epgsql)
+[![Build Status Devel](https://travis-ci.org/epgsql/epgsql.svg?branch=devel)](https://travis-ci.org/epgsql/epgsql)