diff --git a/.github/workflows/acc.yml b/.github/workflows/acc.yml index 624f5ae3..b861ae4f 100644 --- a/.github/workflows/acc.yml +++ b/.github/workflows/acc.yml @@ -22,28 +22,18 @@ on: types: [published] jobs: - acc: - runs-on: ubuntu-20.04 - strategy: - matrix: - go: [ '1.19' ] - name: Acceptance Tests - steps: - - name: Checkout workspace - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.19' - - name: Install dependencies - run: | - sudo apt-get install -y wget jq - wget https://releases.hashicorp.com/terraform/1.0.0/terraform_1.0.0_linux_amd64.zip - sudo unzip -fo terraform_1.0.0_linux_amd64.zip -d /usr/local/bin - - - name: Install necessary tools - run: make tools - - - name: Run Acceptance test - run: | - make acceptance + acc-test: + uses: ./.github/workflows/reusable-dev-acc.yml + with: + test_case: ${{ inputs.test_case }} + test_description: ${{ inputs.test_description }} + test_case_folder: 'acc-testcases' + secrets: + DEV_HPEGL_IAM_SERVICE_URL: ${{ secrets.HPEGL_IAM_SERVICE_URL }} + DEV_HPEGL_TENANT_ID: ${{ secrets.HPEGL_TENANT_ID }} + DEV_HPEGL_USER_SECRET: ${{ secrets.HPEGL_USER_SECRET }} + DEV_HPEGL_USER_ID: ${{ secrets.HPEGL_USER_ID }} + DEV_HPEGL_VMAAS_API_URL: ${{ secrets.HPEGL_VMAAS_API_URL }} + DEV_HPEGL_VMAAS_LOCATION: ${{ secrets.HPEGL_VMAAS_LOCATION }} + DEV_HPEGL_VMAAS_SPACE_NAME: ${{ secrets.HPEGL_VMAAS_SPACE_NAME}} + TF_ACC: ${{ secrets.TF_ACC }} diff --git a/.github/workflows/dev-acc.yml b/.github/workflows/dev-acc.yml index f8365da6..2a695e35 100644 --- a/.github/workflows/dev-acc.yml +++ b/.github/workflows/dev-acc.yml @@ -21,29 +21,17 @@ on: type: string jobs: - acc: - timeout-minutes: 600 - runs-on: ubuntu-20.04 - strategy: - matrix: - go: [ '1.19' ] - name: Dev Acceptance Tests - steps: - - name: Checkout workspace - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.19' - - name: Install dependencies - run: | - sudo apt-get install -y wget jq - wget https://releases.hashicorp.com/terraform/1.0.0/terraform_1.0.0_linux_amd64.zip - sudo unzip -fo terraform_1.0.0_linux_amd64.zip -d /usr/local/bin - - - name: Install necessary tools - run: make tools - - - name: Run Acceptance test - run: | - export TF_ACC_TEST_PATH="$(pwd)/acc-dev-testcases" && make acceptance + acc-test: + uses: ./.github/workflows/reusable-dev-acc.yml + with: + test_case: ${{ inputs.test_case }} + test_description: ${{ inputs.test_description }} + secrets: + DEV_HPEGL_IAM_SERVICE_URL: ${{ secrets.DEV_HPEGL_IAM_SERVICE_URL }} + DEV_HPEGL_TENANT_ID: ${{ secrets.DEV_HPEGL_TENANT_ID }} + DEV_HPEGL_USER_SECRET: ${{ secrets.DEV_HPEGL_USER_SECRET }} + DEV_HPEGL_USER_ID: ${{ secrets.DEV_HPEGL_USER_ID }} + DEV_HPEGL_VMAAS_API_URL: ${{ secrets.DEV_HPEGL_VMAAS_API_URL }} + DEV_HPEGL_VMAAS_LOCATION: ${{ secrets.DEV_HPEGL_VMAAS_LOCATION }} + DEV_HPEGL_VMAAS_SPACE_NAME: ${{ secrets.DEV_HPEGL_VMAAS_SPACE_NAME}} + TF_ACC: ${{ secrets.TF_ACC }}