diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca84ee8c..60c27dae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,9 +40,6 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=80 --statistics - name: Download executables needed for tests - env: - GITHUB_TOKEN: ${{ github.token }} # Needed for downloading executables - NLMOD_SUPPRESS_EXE_VERION_CHECK: "True" shell: bash -l {0} run: | python -c "import nlmod; nlmod.util.download_mfbinaries()" @@ -51,8 +48,6 @@ jobs: env: NHI_GWO_USERNAME: ${{ secrets.NHI_GWO_USERNAME}} NHI_GWO_PASSWORD: ${{ secrets.NHI_GWO_PASSWORD}} - GITHUB_TOKEN: ${{ github.token }} # Needed for downloading executables - NLMOD_SUPPRESS_EXE_VERION_CHECK: "True" run: | py.test ./tests -m "not notebooks" diff --git a/pyproject.toml b/pyproject.toml index 67f499d2..f1bbe0eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,7 @@ full = [ ] knmi = ["h5netcdf", "nlmod[grib]"] grib = ["cfgrib", "ecmwflibs"] -test = ["pytest>=7", "pytest-cov", "pytest-dependency"] +test = ["pytest>=7", "pytest-cov", "pytest-dependency", "pytest-env"] nbtest = ["nbformat", "nbconvert>6.4.5"] lint = ["flake8", "isort", "black[jupyter]"] ci = ["nlmod[full,lint,test,nbtest]", "netCDF4>=1.6.3", "pandas<2.1.0"] @@ -107,5 +107,6 @@ line-length = 88 extend-include = ["*.ipynb"] [tool.pytest.ini_options] +env = ["NLMOD_SUPPRESS_EXE_VERION_CHECK=True"] addopts = "--strict-markers --durations=0 --cov-report xml:coverage.xml --cov nlmod -v" markers = ["notebooks: run notebooks", "slow: slow tests", "skip: skip tests"]