Skip to content

Commit

Permalink
Updated ci.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzbrand committed Sep 3, 2024
1 parent 76e44b9 commit 0326b88
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ jobs:
uses: actions/checkout@v4
with:
repository: praekeltfoundation/flow_tester
ref: v0.2.1
ref: v0.1.1
path: flow_tester
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Test flows
run: |
./flow_tester/run_flow_tests.exs \
Onboarding/QA/tests/ \
HelpCentre/QA/tests/
./flow_tester/run_flow_tests.exs Onboarding/QA/tests/ HelpCentre/QA/tests/
10 changes: 5 additions & 5 deletions Onboarding/convert_qa_files_to_prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@ def replace_uuids(self, stack_uuids):
self.prod_str = self.prod_str.replace(
str(stack["qa_uuid"]), str(stack["prod_uuid"])
)

def replace_urls(self, qa_url, prod_url):
self.prod_str = self.prod_str.replace(
str(qa_url), str(prod_url)
)
self.prod_str = self.prod_str.replace(str(qa_url), str(prod_url))

def qa_to_prod(self, stack_uuids, qa_url, prod_url):
self.prod_str = self.prod_str.replace('["qa", "true"]', '["qa", "false"]')
Expand All @@ -74,7 +72,9 @@ def export_prod(self):
qa_url, prod_url = get_urls()
config = Config(stack_uuids, QA_DIR, PROD_DIR)
for qa_file in all_filenames:
StackEnvironmentConverter(path=qa_file, config=config, qa_url=qa_url, prod_url=prod_url).export_prod()
StackEnvironmentConverter(
path=qa_file, config=config, qa_url=qa_url, prod_url=prod_url
).export_prod()
stack_not_in_prod = get_stacks_with_no_prod_uuid(stack_uuids)

if not stack_not_in_prod:
Expand Down
2 changes: 2 additions & 0 deletions Onboarding/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ def get_stacks_uuids(stacks_config=None):
stacks_config = load_config()
return stacks_config["stack_uuids"]


def get_urls(stacks_config=None):
if not stacks_config:
stacks_config = load_config()
return stacks_config["qa_url"], stacks_config["prod_url"]


def get_sorted_filenames_with_extension(env: str):
match env.lower():
case "prod":
Expand Down

0 comments on commit 0326b88

Please sign in to comment.