Skip to content

fix: properly invoke withPort (#25) #77

fix: properly invoke withPort (#25)

fix: properly invoke withPort (#25) #77

Workflow file for this run

name: CI with Maven
on:
push:
branches: [ main ]
pull_request:
branches: '*'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v2
if: matrix.os == 'ubuntu-latest'
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven (Windows)
run: mvn -U -ntp clean verify
shell: cmd
if: matrix.os == 'windows-latest'
- name: Build with Maven (not Windows)
run: mvn -U -ntp clean verify
if: matrix.os != 'windows-latest'
- name: Convert Jacoco to Cobertura
run: |
python3 ./.github/scripts/cover2cover.py target/jacoco-report/jacoco.xml src/main/java > target/jacoco-report/cobertura.xml
if: matrix.os == 'ubuntu-latest'
- name: Upload Coverage
uses: actions/[email protected]
if: matrix.os == 'ubuntu-latest'
with:
name: Coverage Report
path: target/jacoco-report
- name: Save PR number
run: |
mkdir -p ./pr/jacoco-report
echo ${{ github.event.number }} > ./pr/NR
echo ${{ github.event.pull_request.head.sha }} > ./pr/SHA
cp target/jacoco-report/cobertura.xml ./pr/jacoco-report/cobertura.xml
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest'
- name: Upload files
uses: actions/upload-artifact@v2
with:
name: pr
path: pr/
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest'