Skip to content

Enable testing for additional python versions and platforms #87

Enable testing for additional python versions and platforms

Enable testing for additional python versions and platforms #87

Workflow file for this run

# 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: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: ["ubuntu-latest", "macos-latest", "windows-latest"]
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
runs-on: ${{ matrix.platform }}
name: test ${{ matrix.platform }} (py${{ matrix.python_version }})
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python_version }}"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt --user
- name: Run mypy
run: |
python -m mypy req_compile
env:
MYPYPATH: req-compile/stubs
- name: Run pylint
run: |
python -m pylint req_compile
- name: Test with pytest
run: |
python -m pytest -v
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt --user
- name: Run black
run: |
black --check --diff req_compile
- name: Run isort
run: |
isort --check-only req_compile