Skip to content

Instantly share code, notes, and snippets.

@ibacher
Created December 14, 2020 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ibacher/56d7535b398b9716b886a27eaed7e62d to your computer and use it in GitHub Desktop.
Save ibacher/56d7535b398b9716b886a27eaed7e62d to your computer and use it in GitHub Desktop.
GitHub Actions Workflow for OpenMRS
# this build is designed to replicate the Travis CI workflow
name: Build with Maven
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
strategy:
matrix:
platform: [ ubuntu-latest ]
java-version: [ 8 ]
runs-on: ${{ matrix.platform }}
env:
PLATFORM: ${{ matrix.platform }}
JAVA_VERSION: ${{ matrix.java-version }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Install dependencies
run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version --file pom.xml
- name: Build with Maven
run: mvn test --batch-mode --file pom.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment