From fa194f63417e2adf2415168cfb7e137c1c574f63 Mon Sep 17 00:00:00 2001 From: Daniela Butano Date: Mon, 21 Dec 2020 18:06:21 +0000 Subject: [PATCH 1/4] Create CI script for github actions --- .github/workflows/buid.yml | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/buid.yml diff --git a/.github/workflows/buid.yml b/.github/workflows/buid.yml new file mode 100644 index 0000000..4d65ecb --- /dev/null +++ b/.github/workflows/buid.yml @@ -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/ci/init.sh && ./config/ci/run.sh From d5146428501261062ccaf88962916b3e91ba163e Mon Sep 17 00:00:00 2001 From: Daniela Butano Date: Mon, 21 Dec 2020 18:12:53 +0000 Subject: [PATCH 2/4] removed travis file --- .travis.yml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5fac87c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: python -addons: - postgresql: 9.6 -sudo: true -jdk: -- openjdk11 -before_script: -- "./config/init.sh" -script: -- "./config/run.sh" From 2d0fa22c7ab987826710bcf132c6f9cd5aed45bb Mon Sep 17 00:00:00 2001 From: Daniela Butano Date: Mon, 21 Dec 2020 18:13:28 +0000 Subject: [PATCH 3/4] created a new test user in postgres --- config/init.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/init.sh b/config/init.sh index 3bae553..f55c680 100755 --- a/config/init.sh +++ b/config/init.sh @@ -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; + From 86b7dde3ac86dc0bdc625dd7f4f0d5af8c6630f4 Mon Sep 17 00:00:00 2001 From: Daniela Butano Date: Mon, 21 Dec 2020 18:16:01 +0000 Subject: [PATCH 4/4] Fix the path of the scripts --- .github/workflows/buid.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buid.yml b/.github/workflows/buid.yml index 4d65ecb..d7bc0b2 100644 --- a/.github/workflows/buid.yml +++ b/.github/workflows/buid.yml @@ -39,4 +39,4 @@ jobs: # sudo apt-get install -y libpq-dev postgresql-client #sudo service postgresql start - name: Run unit tests - run: ./config/ci/init.sh && ./config/ci/run.sh + run: ./config/init.sh && ./config/run.sh