Skip to content

Commit

Permalink
Refactor to python.
Browse files Browse the repository at this point in the history
  • Loading branch information
everaldorodrigo committed Aug 16, 2024
1 parent a5bc8ac commit 5ce3eda
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/scheduled_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,18 @@ jobs:
import sys
# # Set up Python environment
# def setup_environment():
# # os.environ["AWS_ACCESS_KEY_ID"] = "AWS_ACCESS_KEY_ID"
# # os.environ["AWS_SECRET_ACCESS_KEY"] = "AWS_SECRET_ACCESS_KEY"
# # os.environ["AWS_DEFAULT_REGION"] = "AWS_REGION"
# # os.environ["SLACK_WEBHOOK_URL"] = "SLACK_WEBHOOK_URL"
# # os.environ["SLACK_CHANNEL"] = "SLACK_CHANNEL"
# Set up Python environment
def setup_environment():
# os.environ["AWS_ACCESS_KEY_ID"] = "AWS_ACCESS_KEY_ID"
# os.environ["AWS_SECRET_ACCESS_KEY"] = "AWS_SECRET_ACCESS_KEY"
# os.environ["AWS_DEFAULT_REGION"] = "AWS_REGION"
# os.environ["SLACK_WEBHOOK_URL"] = "SLACK_WEBHOOK_URL"
# os.environ["SLACK_CHANNEL"] = "SLACK_CHANNEL"
subprocess.run(["python", "-m", "venv", ".venv_test"], check=True)
subprocess.run([".venv_test/bin/pip", "install", "--upgrade", "pip"], check=True)
subprocess.run([".venv_test/bin/pip", "install", "-r", "requirements_web.txt"], check=True)
subprocess.run([".venv_test/bin/pip", "install", "pytest", "boto3", "jq"], check=True)
# Determine repository name and set build version file name
def determine_repo_name():
repo_name = subprocess.run(["basename", "$(git rev-parse --show-toplevel)"], capture_output=True, text=True, shell=True).stdout.strip()
Expand Down Expand Up @@ -124,7 +128,8 @@ jobs:
print(" └─ Not stored!")
def main():
# setup_environment()
print("### Setup environment...")
setup_environment()
print("### Determine repository name and set build version file name...")
_, slack_username, build_version_file = determine_repo_name()
Expand Down

0 comments on commit 5ce3eda

Please sign in to comment.