name: Build status
on:
  push:
    branches:
      - master

jobs:
  build:
    name: Unit tests
    strategy:
      max-parallel: 4
      matrix:
        python-version: [2.7]
        os: [ubuntu-18.04, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - name: Environment - checkout code
        uses: actions/checkout@master
      - name: Environment - Setup python
        uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}
      - name: Environment - Use Java 8
        uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Debugging - Export environment variables
        run: export
      - name: Compile
        run: make
      - name: Test - Linux
        if: matrix.os == 'ubuntu-18.04'
        run: RUBICON_LIBRARY=$(pwd)/dist/librubicon.so LD_LIBRARY_PATH="$(pwd)/dist" java org.beeware.rubicon.test.Test
      - name: Test - Mac
        if: matrix.os == 'macos-latest'
        run: RUBICON_LIBRARY=$(pwd)/dist/librubicon.dylib DYLD_LIBRARY_PATH="$(pwd)/dist" java org.beeware.rubicon.test.Test

# Run just one build (one operating system, one Python version)
# at merge time, so that we have an up-to-date GitHub Actions
# build status badge in README.md. This is just a check that
# nothing obviously bad has gone wrong when merging a pull request.
name: Build status
on:
  push:
    branches:
      - master

jobs:
  build:
    name: Unit tests
    runs-on: ubuntu-18.04
    steps:
      - name: Environment - checkout code
        uses: actions/checkout@master
      - name: Environment - Setup python
        uses: actions/setup-python@v1
        with:
          python-version: 2.7
      - name: Environment - Use Java 8
        uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Debugging - Export environment variables
        run: export
      - name: Compile
        run: make
      - name: Test - Linux
        run: RUBICON_LIBRARY=$(pwd)/dist/librubicon.so LD_LIBRARY_PATH="$(pwd)/dist" java org.beeware.rubicon.test.Test

Simplify the GitHub Actions for merge into master
Simplify the GitHub Actions for merge into master
