updated versions #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Metrics | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Step 1 - Checkout master brach from GitHub | |
uses: actions/checkout@v2 | |
with: | |
path: IntroUnitTesting | |
- name: Step 2 - Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Step 3 - Checkout master branch of CK repository from GitHub | |
uses: actions/checkout@v2 | |
with: | |
repository: mauricioaniche/ck | |
path: CK | |
- name: Step 4 - Download and unzip CKJM | |
run: | | |
wget https://www.spinellis.gr/sw/ckjm/ckjm-1.9.zip | |
unzip ckjm-1.9.zip | |
- name: Step 5 - Execute CK over JAR files | |
run: | | |
cd CK | |
mvn clean compile assembly:single | |
cd target | |
java -jar ck-0.6.5-SNAPSHOT-jar-with-dependencies.jar ../../IntroUnitTesting/ | |
- name: Step 6 - Build Maven projects | |
run: | | |
cd IntroUnitTesting/code/calculatorExample ; mvn -B package --file pom.xml | |
cd ../complexNumber ; mvn -B package --file pom.xml | |
cd ../CucumberTestExample ; mvn -B package --file pom.xml | |
cd ../EasyMockExample ; mvn -B package --file pom.xml | |
cd ../MavenExamples/AppEx0 ; mvn -B package --file pom.xml | |
cd ../../MockitoATM ; mvn -B package --file pom.xml | |
cd ../TDDExampleFactorial ; mvn -B package --file pom.xml | |
- name: Step 7.1 - Execute CKJM on assertions project | |
run: | | |
java -jar ckjm-1.9/build/ckjm-1.9.jar IntroUnitTesting/code/assertions/AssertionExample.class | |
java -jar ckjm-1.9/build/ckjm-1.9.jar IntroUnitTesting/code/assertions/*.class | |
- name: Step 7.2 - Execute CKJM on calculatorExample project | |
run: java -jar ckjm-1.9/build/ckjm-1.9.jar IntroUnitTesting/code/calculatorExample/target/classes/calculator/*.class | |
- name: Step 7.3 - Execute CKJM on complexNumber project | |
run: | | |
java -jar ckjm-1.9/build/ckjm-1.9.jar IntroUnitTesting/code/complexNumber/target/classes/complexNumber/*.class | |
java -jar ckjm-1.9/build/ckjm-1.9.jar IntroUnitTesting/code/complexNumber/target/test-classes/complexNumber/*.class | |
- name: Step 7.4 - Execute CKJM on CucumberTestExample project | |
run: | | |
java -jar ckjm-1.9/build/ckjm-1.9.jar IntroUnitTesting/code/CucumberTestExample/target/test-classes/steps/*.class | |
java -jar ckjm-1.9/build/ckjm-1.9.jar IntroUnitTesting/code/CucumberTestExample/target/test-classes/*.class | |
- name: Step 7.5 - Execute CKJM on EasyMockExample project | |
run: | | |
java -jar ckjm-1.9/build/ckjm-1.9.jar IntroUnitTesting/code/EasyMockExample/target/classes/uah/*.class | |
java -jar ckjm-1.9/build/ckjm-1.9.jar IntroUnitTesting/code/EasyMockExample/target/test-classes/uah/*.class | |
- name: Step 7.6 - Execute CKJM on MavenExamples project | |
run: | | |
java -jar ckjm-1.9/build/ckjm-1.9.jar IntroUnitTesting/code/MavenExamples/AppEx0/target/classes/uah/*.class | |
java -jar ckjm-1.9/build/ckjm-1.9.jar IntroUnitTesting/code/MavenExamples/AppEx0/target/test-classes/uah/*.class | |
- name: Step 7.7 - Execute CKJM on MockitoATM project | |
run: | | |
java -jar ckjm-1.9/build/ckjm-1.9.jar IntroUnitTesting/code/MockitoATM/target/classes/uah/*.class | |
java -jar ckjm-1.9/build/ckjm-1.9.jar IntroUnitTesting/code/MockitoATM/target/test-classes/uah/*.class | |
- name: Step 7.8 - Execute CKJM on TDDExampleFactorial project | |
run: java -jar ckjm-1.9/build/ckjm-1.9.jar IntroUnitTesting/code/TDDExampleFactorial/target/classes/uah/*.class | |
- name: Step 8 - Upload metrics report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: CK_report | |
path: CK/target/class.csv |