fabiommendes/sidekick

View on GitHub
.github/workflows/pythonpackage.yml

Summary

Maintainability
Test Coverage
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

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

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        include:
          - python-version: 3.6
            toxenv: py36
          - python-version: 3.7
            toxenv: py37
          - python-version: 3.8
            toxenv: py38
          - python-version: 3.9
            toxenv: py39
#          - python-version: 3.10.0-alpha.6
#            toxenv: py310
          - python-version: 3.8
            toxenv: static
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - uses: actions/cache@v2
      with:
        path: |
          ~/.cache/pip
          ~/sidekick-properties/.tox/
        key: ${{ runner.os }}-pip-${{ hashFiles('*/requirements.txt') }}${{ hashFiles('*/setup.py') }}
        restore-keys: |
          ${{ runner.os }}-pip-
    - name: Prepare CI and install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install tox
        pip install -r requirements.txt
        pip install -r docs/requirements.txt
    - name: Run CI
      env:
        TOXENV: ${{ matrix.toxenv }}
      run: |
        cd sidekick-properties && tox