Skip to content

Commit

Permalink
added secret as environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ashu-taide committed Jul 25, 2024
1 parent dd5e289 commit d17389f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Run Tests on Release

on:
release:
types: [created]

jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v2

- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: '8.1'

- name: Build
run: |
composer install --no-dev --optimize-autoloader
composer box-install
# Warm the symfony cache so it gets bundled with phar.
./bin/acli
composer box-compile
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Run tests
env:
APPLICATION_UUID: ${{ secrets.APPLICATION_UUID }}
APPLICATION_NAME: ${{ secrets.APPLICATION_NAME }}
ACLI_AUTH_TOKEN: ${{ secrets.ACLI_AUTH_TOKEN }}
ACLI_AUTH_SECRET: ${{ secrets.ACLI_AUTH_SECRET }}
# Add more secret environment variables as needed
run: python3 -m unittest discover -s tests/integration/testcases
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

class TestExecutableWithPrompt(unittest.TestCase):

application_uuid = "2ed281d4-9dec-4cc3-ac63-691c3ba002c2"
application_uuid = os.environ.get("APPLICATION_UUID", "xxx")
environment_name = "automated_tests_"+str(time.time()).split(".")[0]
branch = "master"
application_name = "pipelinesvalidation2"
application_name = os.environ.get("APPLICATION_NAME", "xxx")
acli_auth_token = os.environ.get("ACLI_AUTH_TOKEN", "xxx")
acli_auth_secret = os.environ.get("ACLI_AUTH_SECRET", "xxx")

Expand All @@ -21,7 +21,7 @@ def run_executable(self, params=None):
output_list = []
params = params if params is not None else []

command = ['acli'] + params
command = ['./bin/acli'] + params
process = subprocess.Popen(command,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
Expand Down

0 comments on commit d17389f

Please sign in to comment.