diff --git a/.github/workflows/buid.yml b/.github/workflows/buid.yml new file mode 100644 index 0000000..d7bc0b2 --- /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/init.sh && ./config/run.sh 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" 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; +