Skip to content

Bump codecov/codecov-action from 4.3.1 to 4.4.0 (#12) #34

Bump codecov/codecov-action from 4.3.1 to 4.4.0 (#12)

Bump codecov/codecov-action from 4.3.1 to 4.4.0 (#12) #34

Workflow file for this run

name: Build
on:
push:
branches: main
pull_request:
branches: main
schedule:
- cron: '0 16 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
disable-sudo: true
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Set up JDK 17
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version: '17'
distribution: 'adopt'
cache: 'gradle'
- name: Chmod
run: chmod +x ./gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@4c39dd82cd5e1ec7c6fa0173bb41b4b6bb3b86ff # v2.11.0
with:
arguments: build -x test --scan
test:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
disable-sudo: true
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Set up JDK 17
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version: '17'
distribution: 'adopt'
cache: 'gradle'
# - name: Testspace Setup CLI
# uses: testspace-com/setup-testspace@ee1482f978eb5010ec27b6f6372904f01f2edd68 # v1.0.6
# with:
# domain: ${{ github.repository_owner }}
- name: Chmod
run: chmod +x ./gradlew
- name: Test with Gradle
uses: gradle/gradle-build-action@4c39dd82cd5e1ec7c6fa0173bb41b4b6bb3b86ff # v2.11.0
with:
arguments: test -DiHubTest.failFast=true
- name: Upload Coverage Reports
if: ${{ github.repository_owner == 'ihub-pub' }}
uses: codecov/codecov-action@6d798873df2b1b8e5846dba6fb86631229fbcb17 # v4.4.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# - name: Publish Results to Testspace
# run: testspace */build/test-results/test/*.xml */build/reports/*/test/*.xml
- name: Upload Test Result
if: ${{ failure() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: tests
path: |
*/build/reports/tests
retention-days: 1
publish:
if: ${{ github.event_name == 'push' && github.repository_owner == 'ihub-pub' }}
needs: build
name: Publish to Snapshot Repository
runs-on: ubuntu-latest
strategy:
matrix:
java_version: [ 17 ]
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
disable-sudo: true
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version: ${{ matrix.java_version }}
distribution: 'adopt'
cache: 'gradle'
- name: Publish to Snapshot Repository
uses: ihub-pub/bot/publish@abd115201b1f66af6b6ab148aa391f2be7ad8960 # v2.0.1
with:
repoUsername: ${{ secrets.REPO_USERNAME }}
repoPassword: ${{ secrets.REPO_PASSWORD }}
useInferringVersion: true