Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed Oct 1, 2024
1 parent ab13194 commit 6415d04
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ jobs:
- name: Create search_api_mapping.json
run: cp datagateway_api/search_api_mapping.json.example datagateway_api/search_api_mapping.json


# See comment in noxfile.py for explanation regarding this step
- name: Downgrade setuptools
run: pip install --upgrade setuptools==70.0.0
if: matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10'
- name: Install dependencies
run: poetry install

Expand Down Expand Up @@ -287,6 +292,10 @@ jobs:
- name: Install Requests
run: pip install 'requests<2.30'


# See comment in noxfile.py for explanation regarding this step
- name: Downgrade setuptools
run: pip install --upgrade setuptools==70.0.0
- name: Install dependencies
run: poetry install

Expand Down Expand Up @@ -342,6 +351,10 @@ jobs:
- name: Create search_api_mapping.json
run: cd /home/runner/work/datagateway-api/datagateway-api; cp datagateway_api/search_api_mapping.json.example datagateway_api/search_api_mapping.json


# See comment in noxfile.py for explanation regarding this step
- name: Downgrade setuptools
run: pip install --upgrade setuptools==70.0.0
- name: Install dependencies
run: poetry install

Expand Down
8 changes: 6 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ def unit_tests(session):
# A cleaner fix would be to upgrade the packaging library to 22.0+ (as per
# https://github.com/pypa/setuptools/issues/4483#issuecomment-2236339726) but this
# cannot be done on this repo until support for Python 3.6 is dropped
session.run("pip", "install", "--upgrade", "setuptools==70.0.0")
if session.python in ["3.8", "3.9", "3.10"]:
session.run("pip", "install", "--upgrade", "setuptools==70.0.0")

session.run("poetry", "install", external=True)
session.run("pytest", "test/unit", *args)

Expand All @@ -213,6 +215,8 @@ def integration_tests(session):
args = session.posargs
# Explicit downgrade of setuptools also performed here. See explanation in
# `unit_tests()`
session.run("pip", "install", "--upgrade", "setuptools==70.0.0")
if session.python in ["3.8", "3.9", "3.10"]:
session.run("pip", "install", "--upgrade", "setuptools==70.0.0")

session.run("poetry", "install", external=True)
session.run("pytest", "test/integration", *args)

0 comments on commit 6415d04

Please sign in to comment.