jrnl/.github/workflows/python-app.yml
2020-11-07 13:51:11 -08:00

42 lines
1.2 KiB
YAML

# 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: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: |
.venv
~/.cache/pip
key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }}
- 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