Skip to content

Bump actions/checkout from 3 to 4 (#56) #17

Bump actions/checkout from 3 to 4 (#56)

Bump actions/checkout from 3 to 4 (#56) #17

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
allTests:
if: github.repository == 'eiffel-community/eiffel-commons'
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '8'
- name: Run All tests
run: mvn test -B
reportCoverage:
if: github.repository == 'eiffel-community/eiffel-commons' && github.event_name == 'push'
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '8'
- name: Run cobertura
shell: bash
run: |
mvn cobertura:cobertura -Dcobertura.report.format=xml -B
# Generating test coverage report and publishing to Codacy
- name: Run report coverage
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: e47987d1f0e94f809b08d26cfe24e90f
coverage-reports: target/site/cobertura/coverage.xml