diff --git a/app-maven-plugin/.github/workflows/unit-tests.yaml b/app-maven-plugin/.github/workflows/unit-tests.yaml new file mode 100644 index 000000000..f8a4c11be --- /dev/null +++ b/app-maven-plugin/.github/workflows/unit-tests.yaml @@ -0,0 +1,38 @@ +name: Unit Tests +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +jobs: + unit-tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [8, 11] + env: + CLOUDSDK_CORE_DISABLE_USAGE_REPORTING: true + CLOUDSDK_CORE_DISABLE_PROMPTS: true + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 2 + - uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Run tests + run: | + mvn -B -U --fail-at-end clean verify + - name: Test Coverage + uses: codecov/codecov-action@v1 + with: + name: actions ${{matrix.java}} diff --git a/app-maven-plugin/.travis.yml b/app-maven-plugin/.travis.yml deleted file mode 100644 index 27fd026c4..000000000 --- a/app-maven-plugin/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -sudo: false -language: java -matrix: - include: - - name: OpenJDK 8 - jdk: openjdk8 - - name: OpenJDK 11 - jdk: openjdk11 -cache: - directories: - - $HOME/.m2 - - $HOME/google-cloud-sdk -env: - global: - - CLOUDSDK_CORE_DISABLE_USAGE_REPORTING=true - - CLOUDSDK_CORE_DISABLE_PROMPTS=true -install: - # https://github.com/travis-ci/travis-ci/issues/8408 - - unset _JAVA_OPTIONS - - # check if cloud SDK was installed (/bin exists) - # travis auto creates cache directories, so remove it before install - - if [ ! -d $HOME/google-cloud-sdk/bin ]; then - rm -rf $HOME/google-cloud-sdk; - curl https://sdk.cloud.google.com | bash; - fi - # make our installed cloud sdk take precedence - - source $HOME/google-cloud-sdk/path.bash.inc - # update gcloud - - gcloud components update --quiet - # add App Engine component to Cloud SDK - - gcloud components install app-engine-java --quiet - -script: - - mvn clean verify -B -U - -after_success: - # run codecov-io - - bash <(curl -s https://codecov.io/bash)