name: Java CI
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Use Node.js 12.x
        uses: actions/setup-node@v1
        with:
          node-version: '12.x'
      - run: npm ci
      - name: Minify
        run: ./minify
      - name: Set up JDK 11
        uses: actions/setup-java@v1
        with:
          java-version: '11.0.9'
      - name: Build with Maven
        run: mvn clean install
      - name: Build Docker
        run: docker build -f Dockerfile -t gaps-dev .
      - name: Build Docker Compose
        run: docker-compose -f docker-compose-dev.yaml build
      - name: Run Docker Compose
        uses: isbang/compose-action@v0.1
        with: 
          compose-file: 'docker-compose-dev.yaml'