diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82a21064..b8a009c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: services: # Unit test rely on a local MySQL instance with an empty root password. mysql: - image: mysql:5.7 + image: mysql:8.0.30 env: MYSQL_ALLOW_EMPTY_PASSWORD: yes ports: @@ -51,9 +51,9 @@ jobs: cp wp1/credentials.py.e2e wp1/credentials.py cp wp1/credentials.py.dev.e2e wp1/credentials.py.dev - - name: Test with nose + - name: Test with pytest, with coverage run: | - nosetests --with-coverage + pytest --cov - name: Upload to Codecov uses: codecov/codecov-action@v3 diff --git a/requirements.txt b/requirements.txt index ec7cac8d..701b5c99 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,6 +30,7 @@ gunicorn==19.9.0 identify==1.4.6 idna==2.8 importlib-metadata==5.2.0 +iniconfig==2.0.0 isodate==0.6.1 itsdangerous==2.1.2 Jinja2==3.1.2 @@ -44,19 +45,20 @@ mwclient==0.9.3 mwoauth==0.3.8 mwparserfromhell==0.5.2 nodeenv==1.3.3 -nose==1.3.7 -nose-cprof==0.2.1 oauthlib==2.1.0 packaging==21.3 pathspec==0.11.2 platformdirs==2.6.2 +pluggy==1.3.0 pre-commit==2.21.0 PyJWT==2.4.0 PyMySQL==0.9.3 pyparsing==3.0.9 +pytest==7.4.2 +pytest-cov==4.1.0 python-dateutil==2.8.2 pytz==2022.7.1 -PyYAML==5.4.1 +PyYAML==6.0.1 pyyaml_env_tag==0.1 rdflib==6.2.0 redis==4.4.4 @@ -65,6 +67,7 @@ requests-oauthlib==1.0.0 rq==1.13.0 rq-scheduler==0.13.0 s3transfer==0.4.2 +setuptools==68.2.2 six==1.16.0 sortedcontainers==2.4.0 sqlparse==0.4.4 diff --git a/wp1/credentials.py.example b/wp1/credentials.py.example index 2aa5951c..aecf512f 100644 --- a/wp1/credentials.py.example +++ b/wp1/credentials.py.example @@ -18,7 +18,7 @@ from wp1.environment import Environment # yapf: disable # Comment the following line in production systems. -ENV = Environment.TEST if 'nose' in sys.modules.keys() else Environment.DEVELOPMENT +ENV = Environment.TEST if 'pytest' in sys.modules else Environment.DEVELOPMENT # yapf: enable # The directory under conf/ to look for the conf.json file in. So if this is