name: Maven Tests

on: [push, pull_request]

jobs:
  build:
    name: Building JSS
    runs-on: ubuntu-latest

    steps:
    - name: Clone repository
      uses: actions/checkout@v2

    - name: Set up Java
      uses: actions/setup-java@v2
      with:
        java-version: '11'
        distribution: 'adopt'

    - name: Build JSS
      run: mvn install

    - name: Build examples
      run: mvn compile
      working-directory: examples

    # TODO: Run examples
