Bump org.jetbrains.kotlin:kotlin-osgi-bundle from 1.9.21 to 1.9.22 in /cnf #3384
Workflow file for this run
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: Build OpenEMS | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build-java: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Java 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: gradle | |
- uses: kiancross/checkstyle-annotations-action@v1 | |
- name: Build all Java packages | |
run: ./gradlew build | |
- name: Resolve OpenEMS bundles | |
run: ./gradlew resolve | |
- name: Validate BackendApp.bndrun | |
run: git diff --exit-code io.openems.backend.application/BackendApp.bndrun | |
- name: Validate EdgeApp.bndrun | |
run: git diff --exit-code io.openems.edge.application/EdgeApp.bndrun | |
# | |
# Generate Code-coverage-report | |
# | |
- name: Generate JaCoCo Code-coverage-report | |
run: ./gradlew jacocoTestReport | |
- name: Summarize JaCoCo Report | |
id: jacoco | |
uses: cicirello/jacoco-badge-generator@v2 | |
with: | |
jacoco-csv-file: 'io.openems.*/generated/reports/jacoco/**/*.csv' | |
generate-coverage-badge: false | |
- name: Create JaCoCo Badge | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
run: | | |
coverage=$(echo "scale=2; ${{ steps.jacoco.outputs.coverage }} * 100" | bc | cut -c1-4); | |
color=red; | |
if (( $(echo "$coverage > 90" | bc -l) )); then | |
color=success; | |
elif (( $(echo "$coverage > 80" | bc -l) )); then | |
color=green; | |
elif (( $(echo "$coverage > 60" | bc -l) )); then | |
color=yellow; | |
fi; | |
mkdir -p ./jacoco | |
echo $PR_NUMBER > ./jacoco/jacoco_report_number | |
echo '![Code Coverage]'"(https://img.shields.io/badge/Code%20Coverage-${coverage}%25-${color}?style=flat)" > ./jacoco/jacoco_report_badge | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: jacoco_report | |
path: jacoco/ | |
build-ui: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Setup Cache for Node.js | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.npm | |
~/.ng | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- name: Build OpenEMS UI | |
run: | | |
cd ui | |
npm install | |
npm ci --prefer-offline --cache ~/.npm | |
node_modules/.bin/ng config cli.cache.path "~/.ng" | |
node_modules/.bin/ng build -c "openems,openems-edge-prod,prod" | |
node_modules/.bin/ng lint | |
export CHROME_BIN=/usr/bin/google-chrome-stable | |
npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI |