Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Update README.rst

Update README.rst #47

Workflow file for this run

name: Unit tests
on:
push:
branches:
- master
pull_request:
jobs:
lint:
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
matrix:
python-version: [3.7, 3.8]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Lint w/ flake8 - syntax error or undefined names
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Lint w/ flake8 - all
continue-on-error: true
run: |
flake8 . --count --max-complexity=10 --max-line-length=127 --statistics
test:
if: "!contains(github.event.head_commit.message, 'skip ci')"
needs: lint
strategy:
matrix:
python-version: [3.7, 3.8]
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .
- name: Test w/ pytest
run: |
pytest
- name: Code coverage
uses: codecov/codecov-action@v1.0.5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
style:
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
matrix:
python-version: [3.7, 3.8]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black toml
- name: Format source w/ black
# fail when file(s) would be formatted
run: black --check .
type-hints:
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
matrix:
python-version: [3.7, 3.8]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy{,_extensions}
- name: Type check w/ mypy
run: mypy --pretty