Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
max-line-length = 100
select = C,E,F,W,B,B950
ignore = E203, E501, W503, E741, B008
per-file-ignores =
**/__init__.py: F403,F405
68 changes: 68 additions & 0 deletions .github/workflows/summon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# vim: set ft=yaml ts=2 sw=2:

name: Summon Tasks

on: [push]

jobs:
lint:
strategy:
matrix:
python: ['3.7', '3.10']
os: [ubuntu-latest]

name: Static checks

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install

- name: Run static checks
run: poetry run summon static-checks


# test:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the test part is commented here, but the readme says to execute summon test

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's commented on the CI because tests don't work without a config.json. This is being worked on in another branch.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe let it just on that other branch then? So this one keeps "clean".

# strategy:
# matrix:
# python: ['3.10']
# os: [ubuntu-latest, windows-latest]

# name: Python ${{ matrix.python }} on ${{ matrix.os }}

# runs-on: ${{ matrix.os }}

# steps:
# - uses: actions/checkout@v2

# - name: Set up Python ${{ matrix.python }}
# uses: actions/setup-python@v1
# with:
# python-version: ${{ matrix.python }}

# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install poetry
# poetry install

# - name: Run tests
# run: poetry run summon test --coverage

# - name: Generate coverage.xml
# run: poetry run coverage xml

# - uses: codecov/codecov-action@v1
# with:
# fail_ci_if_error: false # Setting this to true is a headache.
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
repos:
- hooks:
- {id: check-yaml}
- {id: end-of-file-fixer}
- {id: trailing-whitespace}
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
- hooks:
- entry: poetry run summon lint --no-full-report
id: linters
language: system
name: Lint
require_serial: true
types: [python]
- entry: poetry run summon format
id: formatters
language: system
name: Format
types: [python]
repo: local
Loading