---
name: CI

on:
  pull_request:
  push:
    branches:
      - master
  schedule:
    - cron: "0 5 * * 0"

defaults:
  run:
    working-directory: cookiecutter-ansible-role

jobs:
  pytest:
    name: Pytest
    runs-on: ubuntu-latest
    steps:
      - name: Check out the codebase.
        uses: actions/checkout@v2
        with:
          path: '{{ cookiecutter.project_name }}'

      - name: Set up Python 3.
        uses: actions/setup-python@v2
        with:
          python-version: '3.x'

      - name: Debug pip version
        run: pip --version

      - name: Install test dependencies.
        run: pip install ansible molecule[docker] docker pytest pytest-testinfra

      - name: Run Pytest
        run: pytest -s
        env:
          PY_COLORS: '1'

---
name: CI

on:
  pull_request:
  push:
    branches:
      - master
  schedule:
    - cron: "0 5 * * 0"

defaults:
  run:
    working-directory: cookiecutter-ansible-role

jobs:
  pytest:
    name: Pytest
    runs-on: ubuntu-latest
    steps:
      - name: Check out the codebase.
        uses: actions/checkout@v2
        with:
          path: '{{ cookiecutter.project_name }}'

      - name: Set up Python 3.
        uses: actions/setup-python@v2
        with:
          python-version: '3.x'

      - name: Install pip
        run: |
          python -m pip install --upgrade pip
          pip install ansible molecule[docker] docker pytest pytest-testinfra

      - name: Run Pytest
        run: pytest -s
        env:
          PY_COLORS: '1'

Install pip explicitly during ci workflow
Install pip explicitly during ci workflow
