Skip to content

Added test branch

Added test branch #4

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
workflow_dispatch:
push:
branches: [ "master", "develop", "feature/AMAIN-139_github_actions" ]
permissions:
contents: read
jobs:
# run unit test with code coverage report if action is triggered by push of master branch
check_if_report_coverage:
env:

Check failure on line 21 in .github/workflows/gradle.yml

View workflow run for this annotation

GitHub Actions / Java CI with Gradle

Invalid workflow file

The workflow is not valid. .github/workflows/gradle.yml (Line: 21, Col: 9): Required property is missing: runs-on
report_coverage : false
coverage_flag : ''
steps:
- name: Set env var
id: step_one
if: github.event_name == 'push' && github.ref_name == 'feature/AMAIN-139_github_actions' && github.ref_type == 'branch'
run: |
echo "REPORT_COVERAGE=true" >> "$GITHUB_ENV"
- name: Set env var2
id: step_one
if: github.event_name == 'push' && github.ref_name == 'feature/AMAIN-139_github_actions' && github.ref_type == 'branch'
run: |
echo "COVERAGE_FLAG=allcoverage" >> "$GITHUB_ENV"
outputs:
report_coverage : ${{ env.REPORT_COVERAGE }}
coverage_flag : ${{ env.COVERAGE_FLAG }}
build:
if: ${{ always() }}
needs: check_if_report_coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: build ${{ needs.outputs.coverage_flag }}
# run unit test with code coverage report if action is triggered by push of master branch
# since Code Climate only evaluate code coverages of default branch.
- name: Unit Tests with publishing code coverage
if: true == ${{ needs.outputs.report_coverage }}
uses: paambaati/codeclimate-action@v4
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
coverageCommand: go test -timeout 999s -coverprofile build/c.out -v ./...
prefix: github.com/aergoio/aergo/v2
coverageLocations: ${{github.workspace}}/build/c.out:gocov
debug: true