Skip to content

Commit

Permalink
Merge pull request #7 from pagopa/PAGOPA-1142-test-adeguare-test-in-g…
Browse files Browse the repository at this point in the history
…pd-orgs-enrollment

[PAGOPA-1142] fix: updated integration and smoke tests
  • Loading branch information
andrea-deri authored Aug 2, 2023
2 parents 6d256d4 + 461733c commit 44f810b
Show file tree
Hide file tree
Showing 29 changed files with 376 additions and 318 deletions.
60 changes: 0 additions & 60 deletions .devops/code-review-pipelines.yml

This file was deleted.

166 changes: 0 additions & 166 deletions .devops/deploy-pipelines.yml

This file was deleted.

76 changes: 38 additions & 38 deletions .github/workflows/code_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,44 +43,44 @@ jobs:
coverage_exclusions: "**/config/*,**/*Mock*,**/model/**,**/entity/*"
cpd_exclusions: "**/model/**,**/entity/*"

# smoke-test:
# name: Smoke Test
# runs-on: ubuntu-latest
# environment:
# name: dev
# steps:
# - name: Checkout
# id: checkout
# uses: actions/checkout@1f9a0c22da41e6ebfa534300ef656657ea2c6707
#
# - name: Login
# id: login
# # from https://github.com/Azure/login/commits/master
# uses: azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2
# with:
# client-id: ${{ secrets.CLIENT_ID }}
# tenant-id: ${{ secrets.TENANT_ID }}
# subscription-id: ${{ secrets.SUBSCRIPTION_ID }}
#
# - name: Run Service on Docker
# shell: bash
# id: run_service_docker
# run: |
# cd ./docker
# chmod +x ./run_docker.sh
# ./run_docker.sh local
#
# - name: Run Integration Tests
# shell: bash
# id: run_integration_test
# run: |
# export SUBKEY=${{ secrets.SUBKEY }}
# export CANARY=${{ inputs.canary }}
# export CUCUMBER_PUBLISH_TOKEN=${{ secrets.CUCUMBER_PUBLISH_TOKEN }}
#
# cd ./integration-test
# chmod +x ./run_integration_test.sh
# ./run_integration_test.sh local
smoke-test:
name: Smoke Test
runs-on: ubuntu-latest
environment:
name: dev
steps:
- name: Checkout
id: checkout
uses: actions/checkout@1f9a0c22da41e6ebfa534300ef656657ea2c6707

- name: Login
id: login
# from https://github.com/Azure/login/commits/master
uses: azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2
with:
client-id: ${{ secrets.CLIENT_ID }}
tenant-id: ${{ secrets.TENANT_ID }}
subscription-id: ${{ secrets.SUBSCRIPTION_ID }}

- name: Run Service on Docker
shell: bash
id: run_service_docker
run: |
cd ./docker
chmod +x ./run_docker.sh
./run_docker.sh local
- name: Run Integration Tests
shell: bash
id: run_integration_test
run: |
export SUBKEY=${{ secrets.SUBKEY }}
export CANARY=${{ inputs.canary }}
export CUCUMBER_PUBLISH_TOKEN=${{ secrets.CUCUMBER_PUBLISH_TOKEN }}
cd ./integration-test
chmod +x ./run_integration_test.sh
./run_integration_test.sh dev ${{ secrets.SUBKEY }}
delete_github_deployments:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create_dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- uses: pagopa/opex-dashboard-azure-action@v1.1.2
with:
environment: ${{ matrix.environment }}
api-name:
api-name: ${{ matrix.product }}
config: .opex/env/${{ matrix.environment }}/config.yaml
client-id: ${{ secrets.CLIENT_ID }}
tenant-id: ${{ secrets.TENANT_ID }}
Expand Down
56 changes: 28 additions & 28 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,35 +51,35 @@ jobs:
tenant-id: ${{ secrets.TENANT_ID }}
subscription-id: ${{ secrets.SUBSCRIPTION_ID }}

# - name: Run Integration Tests
# shell: bash
# run: |
# export SUBKEY=${{ secrets.SUBKEY }}
# export CANARY=${{ inputs.canary }}
# export CUCUMBER_PUBLISH_TOKEN=${{ secrets.CUCUMBER_PUBLISH_TOKEN }}
#
# cd ./integration-test
# chmod +x ./run_integration_test.sh
# ./run_integration_test.sh ${{( github.event.inputs == null && 'dev') || inputs.environment }}
- name: Run Integration Tests
shell: bash
run: |
export SUBKEY=${{ secrets.SUBKEY }}
export CANARY=${{ inputs.canary }}
export CUCUMBER_PUBLISH_TOKEN=${{ secrets.CUCUMBER_PUBLISH_TOKEN }}
# notify:
# needs: [ integration_test ]
# runs-on: ubuntu-latest
# name: Notify
# if: ${{ always() && inputs.notify == 'true' }}
# steps:
# - name: Report Status
# if: ${{ inputs.notify }}
# uses: ravsamhq/notify-slack-action@v2
# with:
# status: ${{ needs.integration_test.result }}
# token: ${{ secrets.GITHUB_TOKEN }}
# notify_when: 'failure,skipped'
# notification_title: '<{run_url}|Scheduled Integration Test> has {status_message}'
# message_format: '{emoji} <{run_url}|{workflow}> {status_message} in <{repo_url}|{repo}>'
# footer: 'Linked to <{workflow_url}| workflow file>'
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
cd ./integration-test
chmod +x ./run_integration_test.sh
./run_integration_test.sh ${{( github.event.inputs == null && 'dev') || inputs.environment }} ${{ secrets.SUBKEY }}
notify:
needs: [ integration_test ]
runs-on: ubuntu-latest
name: Notify
if: ${{ always() && inputs.notify == 'true' }}
steps:
- name: Report Status
if: ${{ inputs.notify }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ needs.integration_test.result }}
token: ${{ secrets.GITHUB_TOKEN }}
notify_when: 'failure,skipped'
notification_title: '<{run_url}|Scheduled Integration Test> has {status_message}'
message_format: '{emoji} <{run_url}|{workflow}> {status_message} in <{repo_url}|{repo}>'
footer: 'Linked to <{workflow_url}| workflow file>'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

delete_github_deployments:
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit 44f810b

Please sign in to comment.