<commit_before>name: CellBase Main

on:
  push:
    branches:
      - develop
      - next

jobs:
  build:
    runs-on: ubuntu-18.04
    strategy:
      matrix:
        mongodb-version: ["4.0", "4.2"]
    steps:
    - uses: actions/checkout@v1
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Clone and build java-common-libs
      run: cd ~ && git clone -b develop https://github.com/opencb/java-common-libs.git && cd ~/java-common-libs && mvn -T 2 clean install -DskipTests && cd $GITHUB_WORKSPACE
    - name: Clone and build biodata
      run: cd ~ && git clone -b develop https://github.com/opencb/biodata.git && cd ~/biodata && mvn -T 2 clean install -DskipTests && cd $GITHUB_WORKSPACE
    - name: Launch MongoDB 
      run: sudo docker run --name mongo -d -p 27017:27017 mongo:${{ matrix.mongodb-version }}
    - name: Build with Maven
      run: mvn -T 2 clean install
#    - name: Export IOTCL for GPG
#      run: echo ::set-env name=GPG_TTY::$(tty)
#    - name: Deploy to Maven Central respository
#      uses: samuelmeuli/action-maven-publish@v1.1.0
#      with:
#        gpg_private_key: ${{ secrets.MAVEN_PRIVATE_KEY }}
#        gpg_passphrase: ${{ secrets.MAVEN_PASSPHRASE }}
#        nexus_username: ${{ secrets.MAVEN_NEXUS_USER }}
#        nexus_password: ${{ secrets.MAVEN_NEXUS_PASSWORD }}
#    - name: Login to DockerHub
#      run: docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
#    - name: Get the version
#      id: get_version
#      run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
#    - name: Build and publish Docker images to DockerHub
#      run: ./build/cloud/docker/docker-build.sh push ${{ steps.get_version.outputs.VERSION }}
##    - name: Build and publish Docker images to DockerHub
##      run: ./build/cloud/docker/docker-build.sh push ${{ github.ref }}
#    - name: Generate Javadocs
#      run: mvn javadoc:aggregate
#    - name: Deploy Javadocs
#      uses: JamesIves/github-pages-deploy-action@releases/v3
#      with:
#        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#        BASE_BRANCH: next       # The branch the action should deploy from.
#        BRANCH: gh-pages        # The branch the action should deploy to.
#        FOLDER: target/site     # The folder the action should deploy.
#        TARGET_FOLDER: apidocs/ ${{ github.ref }}
  deploy:
    name: Build and deploy CellBase libs and Docker images in Maven Central and DockerHub repositories
    runs-on: ubuntu-18.04
    needs: build
    steps:
      - uses: actions/checkout@v1
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Clone and build java-common-libs
        run: cd ~ && git clone -b develop https://github.com/opencb/java-common-libs.git && cd ~/java-common-libs && mvn -T 2 clean install -DskipTests && cd $GITHUB_WORKSPACE
      - name: Clone and build biodata
        run: cd ~ && git clone -b develop https://github.com/opencb/biodata.git && cd ~/biodata && mvn -T 2 clean install -DskipTests && cd $GITHUB_WORKSPACE
      - name: Build with Maven CLI
        run: mvn -T 2 clean install -DskipTests
      - name: Deploy to Maven Central respository
        uses: samuelmeuli/action-maven-publish@v1
        with:
          gpg_private_key: ${{ secrets.MAVEN_PRIVATE_KEY }}
          gpg_passphrase: ${{ secrets.MAVEN_PASSPHRASE }}
          nexus_username: ${{ secrets.MAVEN_NEXUS_USER }}
          nexus_password: ${{ secrets.MAVEN_NEXUS_PASSWORD }}
      - name: Login to dockerhub
        run: docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
      - name: Build and publish Docker images to DockerHub
        run: ./build/cloud/docker/docker-build.sh push
#  docker:
#    name: This job builds and pushes Docker images to DockerHub
#    runs-on: ubuntu-18.04
#    needs: build
#    steps:
#      - uses: actions/checkout@v1
#      - name: Set up JDK 1.8
#        uses: actions/setup-java@v1
#        with:
#          java-version: 1.8
#      - name: Clone and build java-common-libs
#        run: cd ~ && git clone -b develop https://github.com/opencb/java-common-libs.git && cd ~/java-common-libs && mvn -T 2 clean install -DskipTests && cd $GITHUB_WORKSPACE
#      - name: Clone and build biodata
#        run: cd ~ && git clone -b develop https://github.com/opencb/biodata.git && cd ~/biodata && mvn -T 2 clean install -DskipTests && cd $GITHUB_WORKSPACE
#      - name: Build with Maven
#        run: mvn -T 2 clean install -DskipTests
#      - name: Login to dockerhub
#        run: docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
##      - name: Get CellBase version
##        id: get_version
##        run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
#      - name: Build and publish Docker images to DockerHub
#        run: ./build/cloud/docker/docker-build.sh push ${{ github.ref }}
  javadocs:
    name: Generate and push Java Docs
    runs-on: ubuntu-18.04
    needs: build
    steps:
      - uses: actions/checkout@v1
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Get CellBase version
        id: get_version
        run: echo ::set-output name=VERSION::5.0.0-SNAPSHOT
      - name: Generate Javadocs
        run: mvn javadoc:aggregate
      - name: Deploy Javadocs
        uses: JamesIves/github-pages-deploy-action@releases/v3
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          BASE_BRANCH: next               # The branch the action should deploy from.
          BRANCH: gh-pages                # The branch the action should deploy to.
          FOLDER: target/site/apidocs     # The folder the action should deploy.
          TARGET_FOLDER: apidocs/${{ steps.get_version.outputs.VERSION }}<commit_msg>devops: fix java docs deploy in main.yml actions file<commit_after>name: CellBase Main

on:
  push:
    branches:
      - develop
      - next

jobs:
  build:
    name: Build and test CellBase
    runs-on: ubuntu-18.04
    strategy:
      matrix:
        mongodb-version: ["4.0", "4.2"]
    steps:
    - uses: actions/checkout@v1
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Clone and build java-common-libs
      run: cd ~ && git clone -b develop https://github.com/opencb/java-common-libs.git && cd ~/java-common-libs && mvn -T 2 clean install -DskipTests && cd $GITHUB_WORKSPACE
    - name: Clone and build biodata
      run: cd ~ && git clone -b develop https://github.com/opencb/biodata.git && cd ~/biodata && mvn -T 2 clean install -DskipTests && cd $GITHUB_WORKSPACE
    - name: Launch MongoDB 
      run: sudo docker run --name mongo -d -p 27017:27017 mongo:${{ matrix.mongodb-version }}
    - name: Build with Maven
      run: mvn -T 2 clean install
#    - name: Export IOTCL for GPG
#      run: echo ::set-env name=GPG_TTY::$(tty)
#    - name: Deploy to Maven Central respository
#      uses: samuelmeuli/action-maven-publish@v1.1.0
#      with:
#        gpg_private_key: ${{ secrets.MAVEN_PRIVATE_KEY }}
#        gpg_passphrase: ${{ secrets.MAVEN_PASSPHRASE }}
#        nexus_username: ${{ secrets.MAVEN_NEXUS_USER }}
#        nexus_password: ${{ secrets.MAVEN_NEXUS_PASSWORD }}
#    - name: Login to DockerHub
#      run: docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
#    - name: Get the version
#      id: get_version
#      run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
#    - name: Build and publish Docker images to DockerHub
#      run: ./build/cloud/docker/docker-build.sh push ${{ steps.get_version.outputs.VERSION }}
##    - name: Build and publish Docker images to DockerHub
##      run: ./build/cloud/docker/docker-build.sh push ${{ github.ref }}
#    - name: Generate Javadocs
#      run: mvn javadoc:aggregate
#    - name: Deploy Javadocs
#      uses: JamesIves/github-pages-deploy-action@releases/v3
#      with:
#        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#        BASE_BRANCH: next       # The branch the action should deploy from.
#        BRANCH: gh-pages        # The branch the action should deploy to.
#        FOLDER: target/site     # The folder the action should deploy.
#        TARGET_FOLDER: apidocs/ ${{ github.ref }}
  deploy:
    name: Build and deploy CellBase libs, Java docs and Docker images in Maven Central and DockerHub repositories
    runs-on: ubuntu-18.04
    needs: build
    steps:
      - uses: actions/checkout@v1
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Clone and build java-common-libs
        run: cd ~ && git clone -b develop https://github.com/opencb/java-common-libs.git && cd ~/java-common-libs && mvn -T 2 clean install -DskipTests && cd $GITHUB_WORKSPACE
      - name: Clone and build biodata
        run: cd ~ && git clone -b develop https://github.com/opencb/biodata.git && cd ~/biodata && mvn -T 2 clean install -DskipTests && cd $GITHUB_WORKSPACE
      - name: Build with Maven CLI
        run: mvn -T 2 clean install -DskipTests
      - name: Deploy to Maven Central respository
        uses: samuelmeuli/action-maven-publish@v1
        with:
          gpg_private_key: ${{ secrets.MAVEN_PRIVATE_KEY }}
          gpg_passphrase: ${{ secrets.MAVEN_PASSPHRASE }}
          nexus_username: ${{ secrets.MAVEN_NEXUS_USER }}
          nexus_password: ${{ secrets.MAVEN_NEXUS_PASSWORD }}
      - name: Login to dockerhub
        run: docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
      - name: Build and publish Docker images to DockerHub
        run: ./build/cloud/docker/docker-build.sh push
      - name: Get CellBase version
        id: get_version
        run: echo ::set-output name=VERSION::5.0.0-SNAPSHOT
      - name: Generate Javadocs
        run: mvn javadoc:aggregate
      - name: Deploy Javadocs
        uses: JamesIves/github-pages-deploy-action@releases/v3
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          BASE_BRANCH: next               # The branch the action should deploy from.
          BRANCH: gh-pages                # The branch the action should deploy to.
          FOLDER: target/site/apidocs     # The folder the action should deploy.
          TARGET_FOLDER: apidocs/${{ steps.get_version.outputs.VERSION }}
#  docker:
#    name: This job builds and pushes Docker images to DockerHub
#    runs-on: ubuntu-18.04
#    needs: build
#    steps:
#      - uses: actions/checkout@v1
#      - name: Set up JDK 1.8
#        uses: actions/setup-java@v1
#        with:
#          java-version: 1.8
#      - name: Clone and build java-common-libs
#        run: cd ~ && git clone -b develop https://github.com/opencb/java-common-libs.git && cd ~/java-common-libs && mvn -T 2 clean install -DskipTests && cd $GITHUB_WORKSPACE
#      - name: Clone and build biodata
#        run: cd ~ && git clone -b develop https://github.com/opencb/biodata.git && cd ~/biodata && mvn -T 2 clean install -DskipTests && cd $GITHUB_WORKSPACE
#      - name: Build with Maven
#        run: mvn -T 2 clean install -DskipTests
#      - name: Login to dockerhub
#        run: docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
##      - name: Get CellBase version
##        id: get_version
##        run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
#      - name: Build and publish Docker images to DockerHub
#        run: ./build/cloud/docker/docker-build.sh push ${{ github.ref }}
#  javadocs:
#    name: Generate and push Java Docs
#    runs-on: ubuntu-18.04
#    needs: build
#    steps:
#      - uses: actions/checkout@v1
#      - name: Set up JDK 1.8
#        uses: actions/setup-java@v1
#        with:
#          java-version: 1.8
#      - name: Get CellBase version
#        id: get_version
#        run: echo ::set-output name=VERSION::5.0.0-SNAPSHOT
#      - name: Generate Javadocs
#        run: mvn javadoc:aggregate
#      - name: Deploy Javadocs
#        uses: JamesIves/github-pages-deploy-action@releases/v3
#        with:
#          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#          BASE_BRANCH: next               # The branch the action should deploy from.
#          BRANCH: gh-pages                # The branch the action should deploy to.
#          FOLDER: target/site/apidocs     # The folder the action should deploy.
#          TARGET_FOLDER: apidocs/${{ steps.get_version.outputs.VERSION }}
{'fraction_non_alphanumeric': 0.11713923649611913, 'fraction_numerical': 0.011721843814351339, 'mean_word_length': 2.3555673664629286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '742111', 'n_tokens_mistral': 4472, 'n_tokens_neox': 4144, 'n_words': 1134}