# This workflow will install Python dependencies, run tests and lint with a single version of Python # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: Python application on: push: branches: [ develop ] pull_request: branches: [ develop ] jobs: build: runs-on: ubuntu-latest strategy: matrix: python-version: [3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 - name: Python version id: get-python-version run: | echo "::set-output \"name=python::$(python --version)\"" shell: bash - uses: actions/cache@v2 with: path: | .venv key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ steps.get-python-version.outputs.python }} - name: Set up Python 3.8 uses: actions/setup-python@v2 with: python-version: 3.8 - name: Install dependencies run: | pip install poetry poetry config --local virtualenvs.in-project true poetry install --remove-untracked - name: Test with pytest run: | poetry run pytest - name: Test with behave run: | poetry run behave --no-skipped --format progress2