name: CI
on:
  pull_request:
  push:
permissions:
  contents: read
jobs:
  test:
    runs-on: ubuntu-latest
    if: github.repository == 'lightbend/config'
    strategy:
      fail-fast: false
      matrix:
        include:
          - java: 8
          - java: 11
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Setup JDK
        uses: actions/setup-java@v4
        with:
          distribution: temurin
          java-version: ${{ matrix.java }}
      - name: Setup sbt launcher
        uses: sbt/setup-sbt@v1
      - name: Build and test
        shell: bash
        run: sbt -v test doc
