Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/simplebuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: OnPush
on: [push, pull_request]
env:
MAVEN_VERSION: 3.9.6
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
architecture: x64

# Install Apache Maven >= 3.9; otherwise, we get the error,
# "Detected Maven Version: 3.8.8 is not in the allowed range [3.9,)."
# Add Maven envars for subsequent actions:
# * PATH: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path
# * MAVEN_HOME: https://docs.github.com/en/actions/learn-github-actions/variables#passing-values-between-steps-and-jobs-in-a-workflow
- name: Install Apache Maven 3.9
run: |
sudo apt-get update && \
sudo apt-get install curl && \
curl -s -L https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz | tar xzf - -C /opt/ && \
echo "/opt/apache-maven-${MAVEN_VERSION}/bin/" >> $GITHUB_PATH && \
echo "MAVEN_HOME=/opt/apache-maven-${MAVEN_VERSION}/bin/" >> $GITHUB_ENV

- name: Compile and Package
# org.eclipse.mat.ui.rcp.tests fails without -Pskip-ui-tests
run: |
cd parent && \
mvn --version && \
mvn clean install -Pskip-ui-tests