fix the can VM fit on Host check, added Unit tests for the SimHost #632
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 | |
on: | |
pull_request: | |
branches: [ master ] | |
push: | |
branches: [ master ] | |
merge_group: | |
permissions: | |
contents: read | |
checks: write | |
id-token: write | |
pull-requests: write | |
jobs: | |
build: | |
name: Build (Java ${{ matrix.java }} - ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-22.04 ] | |
java: [ 19 ] | |
include: | |
- os: windows-2022 | |
java: 19 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Validate Gradle wrapper | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Execute Gradle build | |
run: ./gradlew build | |
- name: Execute Gradle assembleDist | |
run: ./gradlew assembleDist | |
- name: Execute Gradle codeCoverageReport | |
run: ./gradlew codeCoverageReport | |
- name: Publish report | |
if: always() | |
uses: mikepenz/action-junit-report@v5 | |
with: | |
check_name: test (Java ${{ matrix.java }}) | |
report_paths: '**/build/test-results/test/TEST-*.xml' | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload reports | |
if: always() | |
continue-on-error: true # See https://github.com/actions/upload-artifact/issues/270 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: reports-${{ matrix.os }}-jdk${{ matrix.java }} | |
path: | | |
./**/build/reports/**/* | |
./**/build/test-results/**/* | |
retention-days: 5 | |
- name: Upload build | |
continue-on-error: true | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-${{ matrix.os }}-jdk${{ matrix.java }} | |
path: | | |
./**/build/distributions/**/*.zip | |
retention-days: 5 | |
- name: Upload code coverage | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml | |
build-docker: | |
name: Build Docker Images | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Build UI | |
uses: docker/build-push-action@v6 | |
with: | |
context: opendc-web/opendc-web-ui | |
file: opendc-web/opendc-web-ui/Dockerfile | |
- name: Build Web Server | |
uses: docker/build-push-action@v6 | |
with: | |
file: opendc-web/opendc-web-server/Dockerfile | |
- name: Build Runner | |
uses: docker/build-push-action@v6 | |
with: | |
file: opendc-web/opendc-web-runner/Dockerfile | |
build-docs: | |
defaults: | |
run: | |
working-directory: site | |
name: Build Docs | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
cache: 'npm' | |
cache-dependency-path: site/package-lock.json | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v5 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build with Docusaurus | |
run: npm run build | |
env: | |
DOCUSAURUS_URL: ${{ steps.pages.outputs.origin }} | |
DOCUSAURUS_BASE_PATH: ${{ steps.pages.outputs.base_path }}/ | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./site/build |