Skip to content

Commit

Permalink
test(json): Set the development_base_url using the ref name
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Oct 13, 2023
1 parent b113081 commit 52f6408
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from ocdskit.schema import add_validation_properties

# Whether to use the 1.2-dev version of OCDS.
use_development_version = '1.2' in os.getenv('GITHUB_REF_NAME', '')
use_development_version = '1.2' in os.getenv('GITHUB_REF_NAME', '') or '1.2' in os.getenv('GITHUB_BASE_REF', '')

# The codelists defined in `schema/codelists`. XXX Hardcoding.
external_codelists = {
Expand Down Expand Up @@ -74,7 +74,7 @@
ocds_schema_base_url = 'https://standard.open-contracting.org/infrastructure/schema/'
else:
ocds_schema_base_url = 'https://standard.open-contracting.org/schema/'
development_base_url = 'https://raw.githubusercontent.com/open-contracting/standard/1.2-dev/schema'
development_base_url = f"https://raw.githubusercontent.com/open-contracting/standard/{os.getenv('GITHUB_REF_NAME', '1.2-dev')}/schema"
ocds_tags = re.findall(r'\d+__\d+__\d+', http_get(ocds_schema_base_url).text)
if ocds_version:
ocds_tag = ocds_version.replace('.', '__')
Expand Down

0 comments on commit 52f6408

Please sign in to comment.