Skip to content

Merge pull request #4 from danrodgar/dependabot/maven/code/CucumberTe… #9

Merge pull request #4 from danrodgar/dependabot/maven/code/CucumberTe…

Merge pull request #4 from danrodgar/dependabot/maven/code/CucumberTe… #9

Workflow file for this run

name: Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Step 1 - Checkout main brach from GitHub
uses: actions/checkout@v2
- name: Step 2 - Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Step 3.1.1 - Have GitHub Actions Build Maven calculatorExample Project
run: cd code/calculatorExample ; mvn -B package --file pom.xml
- name: Step 3.1.2 - Generate JaCoCo Badge calculatorExample Project
id: jacoco1
uses: cicirello/[email protected]
with:
jacoco-csv-file: code/calculatorExample/target/site/jacoco/jacoco.csv
coverage-badge-filename: badge_calculatorExample.svg
- name: Step 3.2.1 - Have GitHub Actions Build Maven complexNumber Project
run: cd code/complexNumber ; mvn -B package --file pom.xml
- name: Step 3.2.2 - Generate JaCoCo Badge complexNumber Project
id: jacoco2
uses: cicirello/[email protected]
with:
jacoco-csv-file: code/complexNumber/target/site/jacoco/jacoco.csv
coverage-badge-filename: badge_complexNumber.svg
- name: Step 3.3.1 - Have GitHub Actions Build Maven CucumberTestExample Project
run: cd code/CucumberTestExample ; mvn -B package --file pom.xml
- name: Step 3.4.1 - Have GitHub Actions Build Maven EasyMockExample Project
run: cd code/EasyMockExample ; mvn -B package --file pom.xml
- name: Step 3.5.1 - Have GitHub Actions Build Maven MavenExamples Project
run: cd code/MavenExamples/AppEx0 ; mvn -B package --file pom.xml
- name: Step 3.5.2 - Generate JaCoCo Badge MavenExamples Project
id: jacoco4
uses: cicirello/[email protected]
with:
jacoco-csv-file: code/MavenExamples/AppEx0/target/site/jacoco/jacoco.csv
coverage-badge-filename: badge_MavenExamples.svg
- name: Step 3.6.1 - Have GitHub Actions Build Maven MockitoATM Project
run: cd code/MockitoATM ; mvn -B package --file pom.xml
- name: Step 3.6.2 - Generate JaCoCo Badge MockitoATM Project
id: jacoco5
uses: cicirello/[email protected]
with:
jacoco-csv-file: code/MockitoATM/target/site/jacoco/jacoco.csv
coverage-badge-filename: badge_MockitoATM.svg
- name: Step 3.7.1 - Have GitHub Actions Build Maven TDDExampleFactorial Project
run: cd code/TDDExampleFactorial ; mvn -B package --file pom.xml
- name: Step 3.7.2 - Generate JaCoCo Badge TDDExampleFactorial Project
id: jacoco6
uses: cicirello/[email protected]
with:
jacoco-csv-file: code/TDDExampleFactorial/target/site/jacoco/jacoco.csv
coverage-badge-filename: badge_TDDExampleFactorial.svg
- name: Steps 4 - Commit the badges (if it changed)
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name 'Javier-DlaP'
git config --global user.email '[email protected]'
git add -A
git commit -m "Autogenerated JaCoCo coverage badges"
git push
fi
- name: Steps 5.1 - Upload JaCoCo coverage report calculatorExample project
uses: actions/upload-artifact@v2
with:
name: jacoco-report-calculatorExample
path: code/calculatorExample/target/site/jacoco/
- name: Steps 5.2 - Upload JaCoCo coverage report complexNumber project
uses: actions/upload-artifact@v2
with:
name: jacoco-report-complexNumber
path: code/complexNumber/target/site/jacoco/
- name: Steps 5.3 - Upload JaCoCo coverage report MavenExamples project
uses: actions/upload-artifact@v2
with:
name: jacoco-report-MavenExamples
path: code/MavenExamples/AppEx0/target/site/jacoco/
- name: Steps 5.4 - Upload JaCoCo coverage report MockitoATM project
uses: actions/upload-artifact@v2
with:
name: jacoco-report-MockitoATM
path: code/MockitoATM/target/site/jacoco/
- name: Steps 5.5 - Upload JaCoCo coverage report TDDExampleFactorial project
uses: actions/upload-artifact@v2
with:
name: jacoco-report-TDDExampleFactorial
path: code/TDDExampleFactorial/target/site/jacoco/