diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 93893d55..580c77b1 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -55,6 +55,20 @@ jobs: - name: Install dependencies run: poetry install + # Prep for using the API for tests + - name: Create log file + run: touch logs.log + - name: Configure log file location + run: echo "`yq \ + '.log_location="${GITHUB_WORKSPACE}/logs.log"' datagateway_api/config.yaml.example | envsubst`" > datagateway_api/config.yaml.example + - name: Configure datagateway extension + run: echo "`yq \ + '.datagateway_api.extension="/datagateway_api"' datagateway_api/config.yaml.example`" > datagateway_api/config.yaml.example + - name: Create config.yaml + run: cp datagateway_api/config.yaml.example datagateway_api/config.yaml + - name: Create search_api_mapping.json + run: cp datagateway_api/search_api_mapping.json.example datagateway_api/search_api_mapping.json + # Run Unit tests - name: Run Nox unit tests session run: nox -p ${{ matrix.python-version }} -s unit_tests -- --cov=datagateway_api --cov-report=xml @@ -108,20 +122,6 @@ jobs: run: | cd /home/runner/install/icat.server/ && ./setup -vv install - # Prep for using the API for tests - - name: Create log file - run: touch logs.log - - name: Configure log file location - run: echo "`yq \ - '.log_location="${GITHUB_WORKSPACE}/logs.log"' datagateway_api/config.yaml.example | envsubst`" > datagateway_api/config.yaml.example - - name: Configure datagateway extension - run: echo "`yq \ - '.datagateway_api.extension="/datagateway_api"' datagateway_api/config.yaml.example`" > datagateway_api/config.yaml.example - - name: Create config.yaml - run: cp datagateway_api/config.yaml.example datagateway_api/config.yaml - - name: Create search_api_mapping.json - run: cp datagateway_api/search_api_mapping.json.example datagateway_api/search_api_mapping.json - - name: Add dummy data to icatdb run: | poetry run python -m util.icat_db_generator diff --git a/poetry.lock b/poetry.lock index a1e4d2d7..e7fa354e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -112,7 +112,7 @@ python-versions = "~=3.5" [[package]] name = "certifi" -version = "2022.9.24" +version = "2022.12.7" description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false @@ -199,7 +199,7 @@ packaging = ">=20.4" [[package]] name = "cryptography" -version = "38.0.2" +version = "38.0.4" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "dev" optional = false @@ -374,7 +374,7 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "flake8-import-order" -version = "0.18.1" +version = "0.18.2" description = "Flake8 and pylama plugin that checks the ordering of import statements." category = "dev" optional = false @@ -497,7 +497,7 @@ typing-extensions = {version = ">=3.7.4.3", markers = "python_version < \"3.10\" [[package]] name = "greenlet" -version = "2.0.0" +version = "2.0.1" description = "Lightweight in-process concurrent programming" category = "main" optional = false @@ -505,7 +505,7 @@ python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" [package.extras] docs = ["sphinx", "docutils (<0.18)"] -test = ["objgraph", "faulthandler"] +test = ["objgraph", "psutil", "faulthandler"] [[package]] name = "icdiff" @@ -695,14 +695,14 @@ testing = ["mock", "pytest", "pytest-rerunfailures"] [[package]] name = "pkginfo" -version = "1.8.3" +version = "1.9.2" description = "Query metadatdata from sdists / bdists / installed packages." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.6" [package.extras] -testing = ["nose", "coverage"] +testing = ["pytest", "pytest-cov"] [[package]] name = "pluggy" @@ -1044,7 +1044,7 @@ python-versions = ">=3.5" [[package]] name = "safety" -version = "2.3.1" +version = "2.3.5" description = "Checks installed dependencies for known vulnerabilities and licenses." category = "dev" optional = false @@ -1054,7 +1054,7 @@ python-versions = "*" Click = ">=8.0.2" dataclasses = {version = "0.8", markers = "python_version == \"3.6\""} dparse = ">=0.6.2" -packaging = ">=21.0" +packaging = ">=21.0,<22.0" requests = "*" "ruamel.yaml" = ">=0.17.21" @@ -1100,7 +1100,7 @@ python-versions = ">=3.6" [[package]] name = "sqlalchemy" -version = "1.4.42" +version = "1.4.45" description = "Database Abstraction Library" category = "main" optional = false @@ -1231,11 +1231,11 @@ python-versions = ">=3.6" [[package]] name = "urllib3" -version = "1.26.12" +version = "1.26.13" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [package.extras] brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"]