Skip to content

Commit

Permalink
misc metadata & tests updates (#50)
Browse files Browse the repository at this point in the history
test weekly (cron) & forks
  • Loading branch information
casperdcl authored Sep 9, 2021
1 parent 2841f3e commit ca46ff9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Test
on: [push, pull_request]
on:
push:
pull_request:
schedule:
- cron: '0 9 * * 1' # M H d m w (Mondays at 9:00)
jobs:
check:
if: startsWith(github.ref, 'refs/tags') || github.event_name == 'pull_request' || github.repository_owner != 'iterative'
Expand All @@ -18,8 +22,15 @@ jobs:
key: pre-commit|${{ env.PYSHA }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pip install -U pre-commit
- uses: reviewdog/action-setup@v1
- run: |
pre-commit run -a flake8 | reviewdog -f=pep8 -name=flake8 -tee -reporter=github-check -filter-mode nofilter
- if: github.event_name != 'schedule'
run: |
if [[ $EVENT == pull_request ]]; then
REPORTER=github-pr-review
else
REPORTER=github-check
fi
pre-commit run -a todo | reviewdog -efm="%f:%l: %m" -name=TODO -tee -reporter=$REPORTER -filter-mode nofilter
pre-commit run -a flake8 | reviewdog -f=pep8 -name=flake8 -tee -reporter=$REPORTER -filter-mode nofilter
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: pre-commit run -a --show-diff-on-failure
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ repos:
- id: todo
name: Check TODO
language: pygrep
entry: TODO
args: [-i]
entry: TODO
types: [text]
exclude: ^(.pre-commit-config.yaml|.github/workflows/test.yml)$
- repo: https://gitlab.com/pycqa/flake8
Expand All @@ -36,7 +36,7 @@ repos:
- flake8-debugger
- flake8-string-format
- repo: https://github.com/psf/black
rev: 21.7b0
rev: 21.8b0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
Expand Down
2 changes: 1 addition & 1 deletion LICENCE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2020 Casper da Costa-Luis
Copyright 2020-2021 Casper da Costa-Luis

Licensed under the Apache Licence, Version 2.0 (the "Licence");
you may not use this project except in compliance with the Licence.
Expand Down
10 changes: 7 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ url=https://github.com/iterative/shtab
project_urls=
Changelog=https://github.com/iterative/shtab/releases
Documentation=https://github.com/iterative/shtab/#shtab
maintainer=Casper da Costa-Luis
maintainer_email=casper.dcl@physics.org
author=Casper da Costa-Luis
author_email=casper.dcl@physics.org
maintainer=Iterative
maintainer_email=support@iterative.ai
keywords=tab, complete, completion, shell, bash, zsh, argparse
platforms=any
provides=shtab
Expand Down Expand Up @@ -51,11 +53,13 @@ classifiers=
Topic :: Education :: Testing
Topic :: Office/Business
Topic :: Other/Nonlisted Topic
Topic :: Software Development
Topic :: Software Development :: Build Tools
Topic :: Software Development :: Libraries
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Software Development :: Pre-processors
Topic :: Software Development :: User Interfaces
Topic :: System
Topic :: System :: Installation/Setup
Topic :: System :: Shells
Topic :: System :: System Shells
Expand All @@ -82,7 +86,7 @@ exclude=build,dist,.eggs,.git,__pycache__

[isort]
profile=black
known_first_party=shtab
known_first_party=shtab,tests

[tool:pytest]
timeout=5
Expand Down

0 comments on commit ca46ff9

Please sign in to comment.