name: Unit Tests

on:
  push:
    branches: ["master"]
  pull_request:
    branches: ["master"]

jobs:
  test:

    runs-on: ubuntu-latest
    strategy:
      max-parallel: 4
      matrix:
        python-version: [3.5, 3.6, 3.7, 3.8]

    steps:
      - uses: actions/checkout@v1
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements-dev.txt

      - name: Run test suite
        run: tox

      # Uncomment when Black is setup for PyPika
      #    - name: Run Black code formatter check
      #      run: black --check .

      - name: Coveralls
        # Official Coveralls GitHub action does not work with Python coverage files!
        # https://github.com/coverallsapp/github-action/issues/30
        uses: AndreMiras/coveralls-python-action@develop
        with:
          parallel: true
          debug: true

  coveralls_finish:
    needs: test
    runs-on: ubuntu-latest
    steps:
      - name: Coveralls Finished
        uses: AndreMiras/coveralls-python-action@develop
        with:
          parallel-finished: true
          debug: true

name: Unit Tests

on:
  push:
    branches: ["master"]
  pull_request:
    branches: ["master"]

jobs:
  test:

    runs-on: ubuntu-latest
    strategy:
      max-parallel: 4
      matrix:
        python-version: [3.5, 3.6, 3.7, 3.8]

    steps:
      - uses: actions/checkout@v1
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements-dev.txt

      - name: Run test suite
        run: tox

      # Uncomment when Black is setup for PyPika
      #    - name: Run Black code formatter check
      #      run: black --check .

      - name: Coveralls
        # Official Coveralls GitHub action does not work with Python coverage files!
        # https://github.com/coverallsapp/github-action/issues/30
        uses: AndreMiras/coveralls-python-action@v20200413
        with:
          parallel: true
          debug: true

  coveralls_finish:
    needs: test
    runs-on: ubuntu-latest
    steps:
      - name: Coveralls Finished
        uses: AndreMiras/coveralls-python-action@develop
        with:
          parallel-finished: true
          debug: true

Set specific version on coveralls-python-action
Set specific version on coveralls-python-action
