From bc48d753c29f776554e1d7ef57f5727fe885d34e Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 12 Jul 2021 22:10:29 +0100 Subject: Update pythonpackage.yml Add pytest step to workflow Add pip install setuptools and wheel Invoke mypy directly, no need for tox --- .github/workflows/pythonpackage.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to '.github/workflows/pythonpackage.yml') diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 53da7614..1560c011 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -28,37 +28,50 @@ jobs: - name: Install dependencies and prepare tests run: | set -x - python -m pip install --upgrade pip + python -m pip install --upgrade pip setuptools wheel python --version; git --version git submodule update --init --recursive git fetch --tags - + + pip install -r requirements.txt pip install -r test-requirements.txt TRAVIS=yes ./init-tests-after-clone.sh - + git config --global user.email "travis@ci.com" git config --global user.name "Travis Runner" # If we rewrite the user's config by accident, we will mess it up # and cause subsequent tests to fail cat test/fixtures/.gitconfig >> ~/.gitconfig + - name: Lint with flake8 run: | set -x pip install flake8 # stop the build if there are Python syntax errors or undefined names - flake8 --ignore=W293,E265,E266,W503,W504,E731 --count --show-source --statistics + flake8 --ignore=W293,E265,E266,W503,W504,E704,E731 --count --show-source --statistics + - name: Check types with mypy run: | set -x - pip install tox - tox -e type + pip install mypy + mypy -p git + - name: Test with nose run: | set -x pip install nose nosetests -v --with-coverage + - name: Documentation run: | set -x pip install -r doc/requirements.txt make -C doc html + + - name: Test with pytest + run: | + set -x + pip install -r requirements-dev.txt + pytest + # pytest settings in tox.ini[pytest] + continue-on-error: true -- cgit v1.2.1 From 37c7121898b8f8b611a78308b3f0660de031021a Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 12 Jul 2021 22:58:50 +0100 Subject: Update pythonpackage.yml Remove nose --- .github/workflows/pythonpackage.yml | 6 ------ 1 file changed, 6 deletions(-) (limited to '.github/workflows/pythonpackage.yml') diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 1560c011..c350f78a 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -56,12 +56,6 @@ jobs: pip install mypy mypy -p git - - name: Test with nose - run: | - set -x - pip install nose - nosetests -v --with-coverage - - name: Documentation run: | set -x -- cgit v1.2.1 From dfce27f1e8592162f5c6ce0cecb287c7eac64c6e Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 12 Jul 2021 23:04:29 +0100 Subject: Update pythonpackage.yml Move pytest before Documentation in workflow --- .github/workflows/pythonpackage.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to '.github/workflows/pythonpackage.yml') diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 67832dc3..4d3652a3 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -62,12 +62,6 @@ pythonpackage.yml pip install mypy mypy -p git - - name: Documentation - run: | - set -x - pip install -r doc/requirements.txt - make -C doc html - - name: Test with pytest run: | set -x @@ -75,3 +69,11 @@ pythonpackage.yml pytest # pytest settings in tox.ini[pytest] continue-on-error: true + + - name: Documentation + run: | + set -x + pip install -r doc/requirements.txt + make -C doc html + + -- cgit v1.2.1 From a8e01c10166815d5ddd8d6ad2cfe3425b509f739 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 12 Jul 2021 23:11:21 +0100 Subject: Add pytests args Not sure it is picking up the tox.ini --- .github/workflows/pythonpackage.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to '.github/workflows/pythonpackage.yml') diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 4d3652a3..9202a49f 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -29,12 +29,6 @@ jobs: run: | set -x python -m pip install --upgrade pip setuptools wheel -1 conflicting file -pythonpackage.yml -.github/workflows/pythonpackage.yml -.github/workflows/pythonpackage.yml -1 conflict - python --version; git --version git submodule update --init --recursive git fetch --tags @@ -61,19 +55,25 @@ pythonpackage.yml set -x pip install mypy mypy -p git - + - name: Test with pytest run: | set -x pip install -r requirements-dev.txt - pytest + pytest --cov --cov-report=term # pytest settings in tox.ini[pytest] continue-on-error: true - + - name: Documentation run: | set -x pip install -r doc/requirements.txt make -C doc html + # - name: Test with nose + # run: | + # set -x + # pip install nose + # nosetests -v --with-coverage + -- cgit v1.2.1 From 907aae8eb0cd2bf32bf3b55b394b6c7fe1dda658 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 12 Jul 2021 23:18:43 +0100 Subject: Update pythonpackage.yml Add 3.10.0-beta.3 to test matrix. (beta 4 out, but wouldn't install. Need to force cache emptying?) --- .github/workflows/pythonpackage.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.github/workflows/pythonpackage.yml') diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 9202a49f..b9811654 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.6, 3.7, 3.8, 3.9, "3.10.0-beta.3"] steps: - uses: actions/checkout@v2 @@ -62,7 +62,7 @@ jobs: pip install -r requirements-dev.txt pytest --cov --cov-report=term # pytest settings in tox.ini[pytest] - continue-on-error: true + continue-on-error: false - name: Documentation run: | @@ -75,5 +75,6 @@ jobs: # set -x # pip install nose # nosetests -v --with-coverage + # continue-on-error: false -- cgit v1.2.1 From 3ef208cb9119bd7f8345f55b991ad196bcdffeb4 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 12 Jul 2021 23:23:27 +0100 Subject: Update pythonpackage.yml update to actions/setup-python@v1 --- .github/workflows/pythonpackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows/pythonpackage.yml') diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index b9811654..e575a016 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -22,7 +22,7 @@ jobs: with: fetch-depth: 9999 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install dependencies and prepare tests -- cgit v1.2.1