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

Create CI script for github actions #4

Closed
wants to merge 4 commits into from
Closed
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
42 changes: 42 additions & 0 deletions .github/workflows/buid.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: HumanMine bio sources CI

on:
push:
pull_request:

jobs:
unit-tests:
runs-on: ubuntu-latest

services:
# Label used to access the service container
postgres:
image: postgres:11
# Provide the password for postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432/tcp
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Set up python 2.7
uses: actions/setup-python@v2
with:
python-version: '2.7'
#- name: Install PostgreSQL client
# run: |
#sudo apt-get update -y
# sudo apt-get install -y libpq-dev postgresql-client
#sudo service postgresql start
- name: Run unit tests
run: ./config/init.sh && ./config/run.sh
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

8 changes: 6 additions & 2 deletions config/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

set -e

export PSQL_USER=postgres
export PSQL_USER=test
sudo -u postgres createuser test
sudo -u postgres psql -c "alter user test with encrypted password 'test';"

# Set up properties
source config/create-ci-properties-files.sh

createdb bio-test
sudo -u postgres createdb bio-test
grant all privileges on database bio-test to test;