diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 5d82d59..c6b0323 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -5,17 +5,17 @@ name: Python package on: push: - branches: [ master ] pull_request: - branches: [ master ] jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - python-version: [3.6, 3.7, 3.8] + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: [3.6, 3.7, 3.8, 3.9, '3.10'] steps: - uses: actions/checkout@v2 @@ -26,16 +26,16 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install -r requirements-dev.txt - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest + - name: Test with pytest and report coverage run: | cd tests - pytest + coverage run -m pytest + coverage report -m cd .. diff --git a/.gitignore b/.gitignore index 8fd2ab4..e4a82b3 100644 --- a/.gitignore +++ b/.gitignore @@ -108,3 +108,6 @@ ENV/ # mypy .mypy_cache/ + +# macOS +*.DS_Store \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100755 index 0000000..cab926c --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,8 @@ +numpy +pandas +python-dateutil +requests +requests-mock +coverage +pytest +flake8 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 7bcaab5..dfbd325 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,4 @@ -coverage==5.0 -numpy>=1.19.1 -pandas>=1.1.1 -python-dateutil==2.8.1 -pytest==3.5.0 -requests>=2.20.0 -requests-mock==1.7.0 -Sphinx==3.3.1 +numpy +pandas +python-dateutil +requests