Skip to content

Run tests on 3.19.83-7c4d28e CORE #296

Run tests on 3.19.83-7c4d28e CORE

Run tests on 3.19.83-7c4d28e CORE #296

name: Execute automation tests
run-name: Run tests on ${{github.event.client_payload.custom_version }} ${{github.event.client_payload.project}}
on:
repository_dispatch:
types: [automation-tests-event]
jobs:
get-environment-variables:
runs-on: ubuntu-22.04
timeout-minutes: 30
outputs:
VERSION: ${{ steps.get-environment-variables.outputs.version }}
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_VERSION: ${{github.event.client_payload.custom_version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Install dependencies
run: |
cd .github/workflows
npm ci
- name: get environment variables
id: get-environment-variables
run: |
node .github/workflows/getEnvironmentVariables.js \
--custom_version "$CUSTOM_VERSION" \
--repo_token "$REPO_TOKEN"
run-tests-on-release:
needs: get-environment-variables
uses: ./.github/workflows/run-tests-on-release.yml
with:
VERSION: ${{needs.get-environment-variables.outputs.VERSION}}
CUSTOM_VERSION: ${{github.event.client_payload.custom_version }}
ADDITIONAL_TITLE: "Core automation test"
secrets: inherit
add-comment-to-release-pr:
if: ${{ !cancelled() }}
needs: run-tests-on-release
runs-on: ubuntu-22.04
steps:
- name: add-comment-to-release-pr
env:
PR_NUMBER: ${{github.event.client_payload.release_pr }}
PR_COMMENT: ${{needs.run-tests-on-release.outputs.PR_COMMENT}}
run: |
export GITHUB_TOKEN=$( \
curl --request GET --url ${{ secrets.VAULT_URL}} --header "Authorization: JWT ${{ secrets.VAULT_JWT }}" | jq -r .token \
)
gh pr comment "$PR_NUMBER" --body "$PR_COMMENT" -R github.com/saleor/saleor-cloud-deployments