Skip to content

Run tests on 3.21.69-0856747 CORE #844

Run tests on 3.21.69-0856747 CORE

Run tests on 3.21.69-0856747 CORE #844

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]
permissions: {}
jobs:
extract-version:
runs-on: ubuntu-22.04
timeout-minutes: 30
permissions:
contents: read
outputs:
VERSION: ${{ steps.extract-version.outputs.version }}
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_VERSION: ${{github.event.client_payload.custom_version }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: "package.json"
cache: "pnpm"
cache-dependency-path: .github/scripts/pnpm-lock.yaml
- name: Install dependencies
run: |
cd .github/scripts
pnpm install
- name: Extract version
id: extract-version
run: |
node .github/scripts/extract-version.js \
--custom_version "$CUSTOM_VERSION" \
--repo_token "$REPO_TOKEN"
run-tests-on-release:
permissions:
contents: read
needs: extract-version
uses: ./.github/workflows/run-tests-on-release.yml
with:
VERSION: ${{needs.extract-version.outputs.VERSION}}
CUSTOM_VERSION: ${{github.event.client_payload.custom_version }}
ADDITIONAL_TITLE: "Core automation test"
secrets: inherit
add-comment-to-release-pr:
if: ${{ !cancelled() }}
permissions:
pull-requests: write
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}}
VAULT_JWT: ${{ secrets.VAULT_JWT }}
VAULT_URL: ${{ secrets.VAULT_URL }}
run: |
export GITHUB_TOKEN=$( \
curl --request GET --url "$VAULT_URL" --header "Authorization: JWT $VAULT_JWT" | jq -r .token \
)
gh pr comment "$PR_NUMBER" --body "$PR_COMMENT" -R github.com/saleor/saleor-cloud-deployments