diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff473387..e94f3188 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: run: echo y | mvn clean install -Dskip.gpg=true -Dspotless.apply.skip=true -Dmaven.javadoc.skip=true test-coverage: - if: github.repository == 'opengoofy/hippo4j' + if: github.repository == 'DDreame/hippo4j' name: Test coverage report runs-on: ubuntu-latest steps: @@ -87,3 +87,48 @@ jobs: run: echo y | mvn -T1C clean install -Dskip.gpg=true -Dspotless.apply.skip=true -Dskip.jacoco.plugin=false - name: Upload to Codecov run: bash <(curl -s https://codecov.io/bash) + # Add a new job for CI checks on pull request + check-pull-request: + name: Check pull request + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + steps: + - uses: actions/checkout@v3 + - name: Cache Maven Repos + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: hippo4j-maven-third-party-${{ hashFiles('**/pom.xml') }} + restore-keys: | + hippo4j-maven-third-party- + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 8 + - name: Test with Maven + run: echo y | mvn -T1C clean install -Dskip.gpg=true -Dspotless.apply.skip=true -Dskip.jacoco.plugin=false + - name: Upload to Codecov + run: bash <(curl -s https://codecov.io/bash) + + # Add a new job for CI checks on push + check-push: + name: Check push + runs-on: ubuntu-latest + if: github.event_name == 'push' + steps: + - uses: actions/checkout@v3 + - name: Cache Maven Repos + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: hippo4j-maven-third-party-${{ hashFiles('**/pom.xml') }} + restore-keys: | + hippo4j-maven-third-party- + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 8 + - name: Test with Maven + run: echo y | mvn -T1C clean install -Dskip.gpg=true -Dspotless.apply.skip=true -Dskip.jacoco.plugin=false + - name: Upload to Codecov + run: bash <(curl -s https://codecov.io/bash) \ No newline at end of file