Skip to content

instructions on how to backup the flows archive #57

instructions on how to backup the flows archive

instructions on how to backup the flows archive #57

# 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: CI Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
linting:
name: Lint with Flake8, Black
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: true
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 black
- name: Lint with Flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --extend-ignore=F821 --exclude .git,.idea,.mypy_cache,Notebooks/
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics --extend-ignore=F821 --exclude .git,.idea,.mypy_cache,Notebooks/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enforce Black codestyle.
uses: psf/black@stable
with:
options: "--check --verbose"
src: "./flows_finder"
version: "22.10.0"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
mypy:
name: mypy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: true
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[test]'
python -m pip install mypy types-requests
- name: Run MyPy
id: runmypy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mypy flows_finder/ typings/tendrils/ --config-file=pyproject.toml --check-untyped-defs
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
name: Pytest on ${{ matrix.os }}, python 3.10
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[test]'
- name: Test with pytest
env:
FLOWS_API_TOKEN: ${{ secrets.FLOWS_API_TOKEN }}
run: |
pytest -v --cov-report "xml:coverage.xml" --cov
- name: Pytest coverage report
uses: MishaKav/pytest-coverage-comment@main
if: startsWith(${{matrix.os}},'ubuntu')
with:
pytest-xml-coverage-path: ./coverage.xml
github_token: ${{ secrets.GITHUB_TOKEN }}
title: Coverage Report
badge-title: Tests Coverage
hide-badge: false
hide-report: false