diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..c1338c91 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Main build + +on: push + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Check out repo + uses: actions/checkout@v2 + + - name: Set up JDK 7 + uses: actions/setup-java@v1 + with: + java-version: 7 + + - name: Cache Maven + uses: actions/cache@v2 + with: + path: ~/.m2/repository/ + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-maven- + + - name: Compile + run: mvn compile --batch-mode + + - name: Run tests + run: mvn test --batch-mode + + - name: Run integration test + run: mvn verify --batch-mode -DskipTests -Prun-its + + - name: Print failed integration test logs + if: ${{ failure() }} + run: cat target/it/*/build.log diff --git a/README.md b/README.md index 9405ce78..3216da49 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Git-Flow Maven Plugin +![.github/workflows/build.yml](https://github.com/aleksandr-m/gitflow-maven-plugin/workflows/.github/workflows/build.yml/badge.svg) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.amashchenko.maven.plugin/gitflow-maven-plugin/badge.svg?subject=Maven%20Central)](https://maven-badges.herokuapp.com/maven-central/com.amashchenko.maven.plugin/gitflow-maven-plugin/) [![License](https://img.shields.io/badge/License-Apache%20License%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) diff --git a/pom.xml b/pom.xml index 4244fd88..d6aff3eb 100644 --- a/pom.xml +++ b/pom.xml @@ -63,7 +63,7 @@ - 1.6 + 1.7 UTF-8 scm:git:git@github.com:aleksandr-m/gitflow-maven-plugin.git https://github.com/aleksandr-m/gitflow-maven-plugin diff --git a/src/it/support-start-it/verify.bsh b/src/it/support-start-it/verify.bsh index 74fa512a..f4bc1b7c 100644 --- a/src/it/support-start-it/verify.bsh +++ b/src/it/support-start-it/verify.bsh @@ -1,9 +1,9 @@ import org.codehaus.plexus.util.FileUtils; try { - File gitRef = new File(basedir, ".git/refs/heads/support/0.0.3"); + File gitRef = new File(basedir, ".git/refs/heads/support/0.0.1"); if (!gitRef.exists()) { - System.out.println("support-start .git/refs/heads/support/0.0.3 doesn't exist"); + System.out.println("support-start .git/refs/heads/support/0.0.1 doesn't exist"); return false; }