Skip to content

fix: mark run as done when skipif is true #9895

fix: mark run as done when skipif is true

fix: mark run as done when skipif is true #9895

Workflow file for this run

name: Java CI
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches: '*'
jobs:
build:
timeout-minutes: 60
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-latest]
fail-fast: false
name: Build on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v6
if: matrix.os == 'ubuntu-20.04'
- name: Set up JDK 1.8
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 8
cache: maven
- run: rm -rf /tmp/*
if: matrix.os == 'ubuntu-20.04'
continue-on-error: true
- name: Build with Maven (Windows)
env:
AWS_REGION: us-west-2
TEMP: "C:\\Temp"
run: "mvn -ntp -U verify -Djava.io.tmpdir=C:\\Temp"
shell: cmd
if: matrix.os != 'ubuntu-20.04'
- name: Build with Maven (not Windows)
env:
AWS_REGION: us-west-2
run: |
sudo -E mvn -ntp -U verify
sudo chown -R runner target
if: matrix.os == 'ubuntu-20.04'
- name: Upload Failed Test Report
uses: actions/upload-artifact@v3
if: failure()
with:
name: Failed Test Report ${{ matrix.os }}
path: target/surefire-reports
- name: Upload Coverage
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-20.04'
with:
name: Coverage Report ${{ matrix.os }}
path: target/jacoco-report
- name: Convert Jacoco unit test report 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-20.04'
- name: Convert Jacoco interation test report to Cobertura
run: python3 .github/scripts/cover2cover.py target/jacoco-report/jacoco-it/jacoco.xml src/main/java > target/jacoco-report/cobertura-it.xml
if: matrix.os == 'ubuntu-20.04'
- name: Check compatibility
run: >-
mvn -ntp japicmp:cmp -DskipTests
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-20.04'
- name: Upload Compatibility Report
uses: actions/upload-artifact@v3
with:
name: Binary Compatibility Report
path: target/japicmp/default-cli.html
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-20.04'
- name: Build benchmark with Maven
# Changes can break the benchmark, so compile it now to make sure it is buildable
run: |
sudo mvn -ntp -U install -DskipTests
sudo mvn -ntp -U -f src/test/greengrass-nucleus-benchmark install
if: matrix.os == 'ubuntu-20.04'
- name: Save PR number
run: |
mkdir -p ./pr/jacoco-report
mkdir -p ./pr/japicmp
mkdir -p target/japicmp
mkdir -p target/jacoco-report
echo ${{ github.event.number }} > ./pr/NR
echo ${{ github.event.pull_request.head.sha }} > ./pr/SHA
cp -R target/japicmp/default-cli.xml ./pr/japicmp/default-cli.xml
cp target/jacoco-report/cobertura.xml ./pr/jacoco-report/cobertura.xml
cp target/jacoco-report/cobertura-it.xml ./pr/jacoco-report/cobertura-it.xml
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-20.04'
- name: Upload files
uses: actions/upload-artifact@v3
with:
name: pr
path: pr/
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-20.04'