diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 5150a04..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,29 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: circleci/openjdk:8-jdk - - working_directory: ~/repo - - steps: - - checkout - - - restore_cache: - keys: - - v1-dependencies-{{ checksum "build.gradle.kts" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - - run: ./gradlew dependencies - - - save_cache: - paths: - - ~/.gradle - key: v1-dependencies-{{ checksum "build.gradle.kts" }} - - - run: - command: | - ./gradlew check - ./gradlew clean jacocoTestReport - bash <(curl -s https://codecov.io/bash) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml new file mode 100644 index 0000000..3220cdc --- /dev/null +++ b/.github/workflows/build_and_test.yml @@ -0,0 +1,49 @@ +name: Build and Test + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK 8 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '8' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Cache Gradle dependencies + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Verify dependencies + run: ./gradlew dependencies + + - name: Run checks and generate report + run: | + ./gradlew clean check + ./gradlew jacocoTestReport + + - name: Upload coverage report to Codecov + uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true diff --git a/build.gradle.kts b/build.gradle.kts index a8c8a8d..929d3ab 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -153,7 +153,7 @@ tasks.jacocoTestReport { .setFrom(files("${buildDir}/jacoco/jvmTest.exec")) reports { - xml.isEnabled = true - html.isEnabled = false + xml.required.set(true) + html.required.set(false) } }