From fefda8c962e394bcc922056ce74ee33ae760a69a Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 12 Jul 2021 16:50:29 +0100 Subject: Add files via upload --- .github/workflows/test_pytest.yml | 55 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/test_pytest.yml (limited to '.github/workflows') diff --git a/.github/workflows/test_pytest.yml b/.github/workflows/test_pytest.yml new file mode 100644 index 00000000..55c8e984 --- /dev/null +++ b/.github/workflows/test_pytest.yml @@ -0,0 +1,55 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python package + +on: + push: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + [3.6, 3.7, 3.8, 3.9, "3.10.0-beta.3"] + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 9999 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies and prepare tests + run: | + set -x + python -m pip install --upgrade pip + python --version; git --version + git submodule update --init --recursive + git fetch --tags + + pip install -r dev-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: Test with pytest + run: | + set -x + pip install -r dev-requirements.txt + pytest --cov --cov-report=term-missing:skip-covered + # --cov-report=html:test/coverage + continue-on-error: true + + + + + -- cgit v1.2.1 From d77b3c0794e1b8e24b7917d7d480305b8063e36d Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 12 Jul 2021 16:52:50 +0100 Subject: Update test_pytest.yml --- .github/workflows/test_pytest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/test_pytest.yml b/.github/workflows/test_pytest.yml index 55c8e984..627e720f 100644 --- a/.github/workflows/test_pytest.yml +++ b/.github/workflows/test_pytest.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: Python package +name: Future on: push: -- cgit v1.2.1 From 185d847ec7647fd2642a82d9205fb3d07ea71715 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 12 Jul 2021 17:02:21 +0100 Subject: Update and rename test_pytest.yml to Future.yml --- .github/workflows/Future.yml | 57 +++++++++++++++++++++++++++++++++++++++ .github/workflows/test_pytest.yml | 55 ------------------------------------- 2 files changed, 57 insertions(+), 55 deletions(-) create mode 100644 .github/workflows/Future.yml delete mode 100644 .github/workflows/test_pytest.yml (limited to '.github/workflows') diff --git a/.github/workflows/Future.yml b/.github/workflows/Future.yml new file mode 100644 index 00000000..39146533 --- /dev/null +++ b/.github/workflows/Future.yml @@ -0,0 +1,57 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Future + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + [3.6, 3.7, 3.8, 3.9, "3.10.0-beta.3"] + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 9999 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies and prepare tests + run: | + set -x + python -m pip install --upgrade pip + python --version; git --version + git submodule update --init --recursive + git fetch --tags + + pip install -r dev-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: Test with pytest + run: | + set -x + pip install -r dev-requirements.txt + pytest --cov --cov-report=term-missing:skip-covered + # --cov-report=html:test/coverage + continue-on-error: true + + + + + diff --git a/.github/workflows/test_pytest.yml b/.github/workflows/test_pytest.yml deleted file mode 100644 index 627e720f..00000000 --- a/.github/workflows/test_pytest.yml +++ /dev/null @@ -1,55 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Future - -on: - push: - branches: [main] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: - [3.6, 3.7, 3.8, 3.9, "3.10.0-beta.3"] - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 9999 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies and prepare tests - run: | - set -x - python -m pip install --upgrade pip - python --version; git --version - git submodule update --init --recursive - git fetch --tags - - pip install -r dev-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: Test with pytest - run: | - set -x - pip install -r dev-requirements.txt - pytest --cov --cov-report=term-missing:skip-covered - # --cov-report=html:test/coverage - continue-on-error: true - - - - - -- cgit v1.2.1 From 882f2a5e93c60e1aad0ab04a6e3eeb09170dee00 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 12 Jul 2021 22:08:40 +0100 Subject: Delete Future.yml Combined pytest into usual workflow --- .github/workflows/Future.yml | 57 -------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 .github/workflows/Future.yml (limited to '.github/workflows') diff --git a/.github/workflows/Future.yml b/.github/workflows/Future.yml deleted file mode 100644 index 39146533..00000000 --- a/.github/workflows/Future.yml +++ /dev/null @@ -1,57 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Future - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: - [3.6, 3.7, 3.8, 3.9, "3.10.0-beta.3"] - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 9999 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies and prepare tests - run: | - set -x - python -m pip install --upgrade pip - python --version; git --version - git submodule update --init --recursive - git fetch --tags - - pip install -r dev-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: Test with pytest - run: | - set -x - pip install -r dev-requirements.txt - pytest --cov --cov-report=term-missing:skip-covered - # --cov-report=html:test/coverage - continue-on-error: true - - - - - -- cgit v1.2.1 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') 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') 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') 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') 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') 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') 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