Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
misc metadata & tests updates (#8)
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 bd054db commit e9fd3ab
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ repos:
- id: todo
name: Check TODO
language: pygrep
args: [-i]
entry: TODO
types: [text]
exclude: ^(.pre-commit-config.yaml|.github/workflows/test.yml)$
args: [-i]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
Expand Down
2 changes: 1 addition & 1 deletion LICENCE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Copyright 2021 Casper da Costa-Luis

Licensed under the Apache Licence, Version 2.0 (the "Licence");
you may not use this file except in compliance with the Licence.
you may not use this project except in compliance with the Licence.
You may obtain a copy of the Licence at

http://www.apache.org/licenses/LICENSE-2.0
Expand Down
8 changes: 7 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,20 @@ classifiers=
Development Status :: 3 - Alpha
Environment :: Console
Environment :: MacOS X
Environment :: Other Environment
Environment :: Plugins
Environment :: Win32 (MS Windows)
Intended Audience :: Developers
Intended Audience :: Education
Intended Audience :: End Users/Desktop
Intended Audience :: Other Audience
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Operating System :: MacOS
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Operating System :: Unix
Programming Language :: Other Scripting Engines
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Expand Down Expand Up @@ -89,4 +92,7 @@ known_first_party=tpi,tests

[tool:pytest]
timeout=5
addopts=-v --tb=short -rxs -W=error --log-level=debug --durations=0 --cov=tpi --cov-report=term-missing --cov-report=xml
log_level=DEBUG
python_files=test_*.py
testpaths=tests
addopts=-v --tb=short -rxs -W=error --durations=0 --cov=tpi --cov-report=term-missing --cov-report=xml

0 comments on commit e9fd3ab

Please sign in to comment.