Skip to content

Commit

Permalink
Merge pull request #112 from caffo/fixes
Browse files Browse the repository at this point in the history
Fix execution and tests
  • Loading branch information
MatthieuBizien authored May 23, 2023
2 parents 3878e8f + 7156918 commit 2381924
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 20 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/python-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
- name: Set up Python environment
uses: actions/setup-python@v1
with:
python-version: "3.6"
python-version: "3.8"
- name: flake8 Lint
uses: py-actions/flake8@v1

uses: py-actions/flake8@v1
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest]
os: [ macos-latest, ubuntu-20.04, windows-latest]
python: [ 3.6, 3.7, 3.8, 3.9 ]

env:
Expand All @@ -20,10 +20,10 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.5.2

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

Expand All @@ -34,4 +34,4 @@ jobs:
python -m pip install mypy
- name: Run backup
run: ./tests.py
run: ./tests.py
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# WARNING: don't forget to update setup.py
gitpython>=3.1.*
loguru==0.4.*
pathvalidate==2.*
python-dotenv>=0.10.*
psutil>=5.6.0
selenium==3.*
gitpython==3.1.20
loguru==0.4.1
pathvalidate==2.5.2
python-dotenv==0.20
psutil==5.9.5
selenium==3.13.0
3 changes: 1 addition & 2 deletions roam_to_git/scrapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ def __init__(self, browser, output_directory, headless=True, debug=False):

logger.trace("Start Firefox")
self.browser = webdriver.Firefox(firefox_profile=firefox_profile,
firefox_options=firefox_options,
service_log_path=os.devnull)
firefox_options=firefox_options)
elif browser == Browser.PHANTOMJS:
raise NotImplementedError()
# TODO configure
Expand Down
10 changes: 5 additions & 5 deletions tests.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/env python3
import os
import unittest
from pathlib import Path
from typing import List

import mypy.api
from typing import List

from roam_to_git.formatter import extract_links, format_link, format_to_do

Expand Down Expand Up @@ -124,8 +123,9 @@ def test_mypy_rtg_and_tests(self):
self._test_mypy(["roam_to_git", "tests.py"])

def test_mypy_all(self):
self._test_mypy([str(f) for f in Path(__file__).parent.iterdir()
if f.is_file() and f.name.endswith(".py")])
self._test_mypy([str(f) for f in os.listdir(".")
if os.path.isfile(f) and f.endswith(".py")
and not f.startswith("setup")])


if __name__ == "__main__":
Expand Down

0 comments on commit 2381924

Please sign in to comment.