name: Docker

on:
  push:
    # Run post-submit tests when pushing to master.
    branches:
      - master

  # Run tests for any PRs.
  pull_request:

jobs:
  # Run tests.
  # See also https://docs.docker.com/docker-hub/builds/automated-testing/
  test:
    name: Test on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]

    steps:
      - uses: actions/checkout@v1
      - name: Run tests
        run: |
          docker-compose build
          docker run --rm qsim-cxx-tests:latest
          docker run --rm qsim-py-tests:latest
          docker run --rm qsim:latest -c /qsim/circuits/circuit_q24

name: Docker

on:
  push:
    # Run post-submit tests when pushing to master.
    branches:
      - master

  # Run tests for any PRs.
  pull_request:

jobs:
  # Run tests.
  # See also https://docs.docker.com/docker-hub/builds/automated-testing/
  test:
    name: Test on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]

    steps:
      - uses: actions/checkout@v1
      - name: Run tests
        run: |
          git submodule init --update
          docker-compose build
          docker run --rm qsim-cxx-tests:latest
          docker run --rm qsim-py-tests:latest
          docker run --rm qsim:latest -c /qsim/circuits/circuit_q24

Initialize submodules before running tests.
Initialize submodules before running tests.