From cb5c9cc5dc35407ed7d33716cef10128d3a5fc77 Mon Sep 17 00:00:00 2001 From: Tim Strazzere Date: Tue, 6 Aug 2024 10:36:28 -0700 Subject: [PATCH] (fix) tweak ci configs --- .github/workflows/ci.yml | 51 ------------------------------------ .github/workflows/gradle.yml | 39 ++++++++------------------- 2 files changed, 11 insertions(+), 79 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 7da0869..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: CI - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - java-version: [8] - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up JDK - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.java-version }} - - - name: Grant execute permission for Gradle - run: chmod +x gradlew - - - name: Build with Gradle - run: ./gradlew assemble - - - name: Run tests - run: ./gradlew test - - - name: Generate coverage report and upload to Coveralls - run: | - ./gradlew jacocoTestReport - ./gradlew coveralls - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - - - name: Cache Gradle packages - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 1b657e9..b6e0915 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -28,40 +28,23 @@ jobs: java-version: '17' distribution: 'temurin' - # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. - # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md - name: Setup Gradle uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2 - name: Build with Gradle Wrapper run: ./gradlew build - # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). - # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. - # - # - name: Setup Gradle - # uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2 - # with: - # gradle-version: '8.5' - # - # - name: Build with Gradle 8.5 - # run: gradle build + - name: Generate coverage report and upload to Coveralls + run: | + ./gradlew jacocoTestReport + ./gradlew coveralls + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - dependency-submission: + - name: Build JAR + run: ./gradlew jar - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 + - name: Upload JAR as artifact + uses: actions/upload-artifact@v3 with: - java-version: '17' - distribution: 'temurin' - - # Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. - # See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md - - name: Generate and submit dependency graph - uses: gradle/actions/dependency-submission@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2 + name: axmlprinter-${{ github.sha.slice(0, 7) }} + path: build/libs/*.jar \ No newline at end of file