From 8e1ce2d6f52bc0e2cb0b44345f62aaf68ef9b5f3 Mon Sep 17 00:00:00 2001 From: Ewout ter Hoeven Date: Wed, 18 May 2022 16:41:20 +0200 Subject: [PATCH 1/2] CI: Use Pytest instead of Nose --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17d37a9e4..0405d8ae2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: - name: Install dependencies run: | pip install --upgrade pip - pip install flake8 nose nose-exclude coverage coveralls + pip install flake8 pytest pytest-cov coverage coveralls pip install -r requirements.txt - name: Lint with flake8 run: | @@ -38,9 +38,9 @@ jobs: 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 nose + - name: Test with Pytest run: - nosetests --exclude-dir=./test/test_connectors --with-coverage --verbose --cover-package=ema_workbench.em_framework --cover-package=ema_workbench.util --cover-package=ema_workbench.analysis + pytest --ignore=./test/test_connectors -v --cov=ema_workbench/em_framework --cov=ema_workbench/util --cov=ema_workbench/analysis - name: Coveralls if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' env: From 72ae7a09d5e3f927df199a8187ed3ab61fbe3bba Mon Sep 17 00:00:00 2001 From: Ewout ter Hoeven Date: Wed, 18 May 2022 16:46:48 +0200 Subject: [PATCH 2/2] CI: Update default build to 3.10 --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0405d8ae2..d2af7b341 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,13 +12,12 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.9"] + python-version: ["3.10"] include: + - os: ubuntu-latest + python-version: "3.9" - os: ubuntu-latest python-version: "3.8" - # Python 3.10 run is disabled, because nose doesn't support Python 3.10 - #- os: ubuntu-latest - # python-version: "3.10" steps: - uses: actions/checkout@v3 @@ -42,7 +41,7 @@ jobs: run: pytest --ignore=./test/test_connectors -v --cov=ema_workbench/em_framework --cov=ema_workbench/util --cov=ema_workbench/analysis - name: Coveralls - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' + if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: coveralls --service=github