Skip to content

change branch

change branch #12

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.

Check failure on line 1 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: Unexpected tag '!('
# 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:
build:
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
if: !( github.event_name == 'push' && (github.ref_name == 'master' || github.ref_name == 'develop') && github.ref_type == 'branch' )
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: build
- name: Build and report code coverage with Gradle
if: github.event_name == 'push' && (github.ref_name == 'master' || github.ref_name == 'develop') && github.ref_type == 'branch'
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: build allcoverage
# 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: github.event_name == 'push' && (github.ref_name == 'master' || github.ref_name == 'develop') && github.ref_type == 'branch'
uses: codecov/codecov-action@v3
with:
files: ${{github.workspace}}/build/reports/jacoco/report.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)