Skip to content

Commit

Permalink
Change Travis badge to GitHub badge and update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Nov 30, 2019
1 parent b710a90 commit db7235e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: |
git config user.name facelessuser
git config user.email "${{ secrets.GH_EMAIL }}"
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/facelessuser/MarkdownPreview.git"
git remote add gh-token "https://${{ secrets.GH_TOKEN }}@github.com/facelessuser/MarkdownPreview.git"
git fetch gh-token && git fetch gh-token gh-pages:gh-pages
python -m mkdocs gh-deploy -v --clean --remote-name gh-token
git push gh-token gh-pages
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Unix Build Status][travis-image]][travis-link]
[![Build][github-ci-image]][github-ci-link]
[![Package Control Downloads][pc-image]][pc-link]
![License][license-image]

Expand Down Expand Up @@ -56,8 +56,8 @@ The code is available at [GitHub][home] under the [MIT license][license].
[pymd]: https://github.com/Python-Markdown/markdown
[pymdownx-docs]: http://facelessuser.github.io/pymdown-extensions/usage_notes/
[tommi]: https://github.com/tommi
[travis-image]: https://img.shields.io/travis/facelessuser/MarkdownPreview/master.svg
[travis-link]: https://travis-ci.org/facelessuser/MarkdownPreview
[pc-image]: https://img.shields.io/packagecontrol/dt/MarkdownPreview.svg
[github-ci-image]: https://github.com/facelessuser/MarkdownPreview/workflows/build/badge.svg
[github-ci-link]: https://github.com/facelessuser/MarkdownPreview/actions?workflow=build
[pc-image]: https://img.shields.io/packagecontrol/dt/MarkdownPreview.svg?logo=sublime%20text&logoColor=cccccc
[pc-link]: https://packagecontrol.io/packages/MarkdownPreview
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg
7 changes: 2 additions & 5 deletions tests/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ class TestSettings(unittest.TestCase):
"""Test JSON settings."""

def _get_json_files(self, pattern, folder='.'):
"""Get json files."""
"""Get JSON files."""

for root, dirnames, filenames in os.walk(folder):
for filename in fnmatch.filter(filenames, pattern):
yield os.path.join(root, filename)
for dirname in [d for d in dirnames if d not in ('.svn', '.git', '.tox')]:
for f in self._get_json_files(pattern, os.path.join(root, dirname)):
yield f
dirnames = [d for d in dirnames if d not in ('.svn', '.git', '.tox')]

def test_json_settings(self):
"""Test each JSON file."""
Expand All @@ -32,7 +30,6 @@ def test_json_settings(self):

for pattern in patterns:
for f in self._get_json_files(pattern):
print(f)
self.assertFalse(
validate_json_format.CheckJsonFormat(False, True).check_format(f),
"%s does not comform to expected format!" % f
Expand Down

0 comments on commit db7235e

Please sign in to comment.