diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 584e116..e75829d 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -33,9 +33,9 @@ permissions: jobs: integration_test: - name: Test ${{(github.event.inputs == null && 'dev') || inputs.environment }} + name: Test ${{(github.event.inputs == null && 'uat') || inputs.environment }} runs-on: ubuntu-latest - environment: ${{(github.event.inputs == null && 'dev') || inputs.environment }} + environment: ${{(github.event.inputs == null && 'uat') || inputs.environment }} steps: - name: Checkout id: checkout @@ -78,38 +78,4 @@ jobs: message_format: '{emoji} <{run_url}|{workflow}> {status_message} in <{repo_url}|{repo}> in ${{ inputs.environment }}' footer: 'Linked to <{workflow_url}| workflow file>' env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - - delete_github_deployments: - runs-on: ubuntu-latest - needs: integration_test - if: ${{ always() }} - steps: - - name: Delete Previous deployments - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6 - env: - SHA_HEAD: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.sha}} - with: - script: | - const { SHA_HEAD } = process.env - - const deployments = await github.rest.repos.listDeployments({ - owner: context.repo.owner, - repo: context.repo.repo, - sha: SHA_HEAD - }); - await Promise.all( - deployments.data.map(async (deployment) => { - await github.rest.repos.createDeploymentStatus({ - owner: context.repo.owner, - repo: context.repo.repo, - deployment_id: deployment.id, - state: 'inactive' - }); - return github.rest.repos.deleteDeployment({ - owner: context.repo.owner, - repo: context.repo.repo, - deployment_id: deployment.id - }); - }) - ); \ No newline at end of file + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/integration-test/src/step_definitions/support/mdb_service_step.js b/integration-test/src/step_definitions/support/mdb_service_step.js index 356db35..9a83c5a 100644 --- a/integration-test/src/step_definitions/support/mdb_service_step.js +++ b/integration-test/src/step_definitions/support/mdb_service_step.js @@ -1,7 +1,10 @@ const assert = require('assert'); -const { Given, When, Then, After } = require('@cucumber/cucumber'); +const { Given, When, Then, After, setDefaultTimeout } = require('@cucumber/cucumber'); const {getMDB, getMdbReceipt, getBody, getPayPosition, payReceipt, getDebtPositions, deleteDebtPosition} = require("./common.js"); +// set timeout for Hooks function, it allows to wait for long task +setDefaultTimeout(15 * 1000); + var fiscalCodeEC = process.env.FISCAL_CODE_EC; var receiptNav = process.env.CORRECT_NAV;