Automatic Testing #38
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: Automatic Testing | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
# only run if src | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore | |
- "src/**" | |
- "pom.xml" | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: "Log level" | |
required: true | |
default: "warning" | |
type: choice | |
options: | |
- info | |
- warning | |
- debug | |
jobs: | |
test: | |
runs-on: [self-hosted, Ubuntu] | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Set up Xvfb | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xvfb | |
Xvfb :99 -screen 0 1024x768x24 & | |
export DISPLAY=:99 | |
- uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '8' | |
distribution: 'zulu' | |
cache: 'maven' | |
- name: Install Maven | |
run: apt-get update; apt-get install maven -y | |
- name: Build with Maven | |
run: mvn clean validate compile test test-compile --file pom.xml |