name: Java CI with Maven, Coveralls

on:
    push:
        branches: [ master ]
    pull_request:
        branches: [ master ]

env:
    MAVEN_OPTS: -Xmx4g -Xms1g
    repo_token: z2NyvKNpclvuc31m2yfZrpzrPr1cnLjSd

jobs:
    build:
        name: Build, Test, Coverage
        runs-on: ubuntu-latest
        
        steps:
        - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
          uses: actions/checkout@v2
          with:
              persist-credentials: false

        - name: Cache local Maven repository
          uses: actions/cache@v2
          with:
            path: ~/.m2/repository
            key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
            restore-keys: |
              build-${{ runner.os }}-maven-

        - name: Install JDK
          uses: AdoptOpenJDK/install-jdk@v1
          with:
              version: '8'
              architecture: x64
              impl: hotspot
              targets: 'JDK_8;JAVA_HOME'

        - name: Install Dependencies
          run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -Dgpg.skip=true -B -V -q --toolchains .github/workflows/.toolchains.xml

        - name: Test & Report
          if: ${{ success() }}
          run: mvn verify coveralls:report -Dcoveralls-repo-token=${repo_token} -Dmaven.javadoc.skip=true -Dgpg.skip=true -B -V -q --toolchains .github/workflows/.toolchains.xml

name: Java CI with Maven, Coveralls

on:
    push:
        branches: [ master ]
    pull_request:
        branches: [ master ]

env:
    MAVEN_OPTS: -Xmx4g -Xms1g
    repo_token: ${{secrets.coveralls_token}}

jobs:
    build:
        name: Build, Test, Coverage
        runs-on: ubuntu-latest
        
        steps:
        - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
          uses: actions/checkout@v2
          with:
              persist-credentials: false

        - name: Cache local Maven repository
          uses: actions/cache@v2
          with:
            path: ~/.m2/repository
            key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
            restore-keys: |
              build-${{ runner.os }}-maven-

        - name: Install JDK
          uses: AdoptOpenJDK/install-jdk@v1
          with:
              version: '8'
              architecture: x64
              impl: hotspot
              targets: 'JDK_8;JAVA_HOME'

        - name: Install Dependencies
          run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -Dgpg.skip=true -B -V -q --toolchains .github/workflows/.toolchains.xml

        - name: Test & Report
          if: ${{ success() }}
          run: mvn verify coveralls:report -Dcoveralls-repo-token=${repo_token} -Dmaven.javadoc.skip=true -Dgpg.skip=true -B -V -q --toolchains .github/workflows/.toolchains.xml

Convert visible token to github secret.
Convert visible token to github secret.