raise_by_secret demo #31554
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Each of these jobs runs the TS SDK E2E tests from this commit against a local testnet | |
# built from one of the aptos-core branches. Currently we only test against a local | |
# testnet in a CLI built from main. | |
env: | |
GIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} | |
name: "TS SDK E2E Tests" | |
on: | |
pull_request_target: | |
types: [labeled, opened, synchronize, reopened, auto_merge_enabled] | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
id-token: write # Required for GCP Workload Identity federation which we use to login into Google Artifact Registry | |
# cancel redundant builds | |
concurrency: | |
# cancel redundant builds on PRs (only on PR, not on branches) | |
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request_target' && github.event.pull_request.head.sha) || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
# Note on the job-level `if` conditions: | |
# This workflow is designed such that we run subsequent jobs only when a 'push' | |
# triggered the workflow or on 'pull_request's which have set auto_merge=true | |
# or have the label "CICD:run-e2e-tests". | |
permission-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check repository permission for user which triggered workflow | |
uses: sushichop/action-repository-permission@13d208f5ae7a6a3fc0e5a7c2502c214983f0241c | |
with: | |
required-permission: write | |
comment-not-permitted: Sorry, you don't have permission to trigger this workflow. | |
# This job determines which files were changed | |
file_change_determinator: | |
needs: [permission-check] | |
runs-on: ubuntu-latest | |
outputs: | |
only_docs_changed: ${{ steps.determine_file_changes.outputs.only_docs_changed }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run the file change determinator | |
id: determine_file_changes | |
uses: ./.github/actions/file-change-determinator | |
# This is a PR required job. This runs both the non-indexer and indexer TS SDK tests. | |
# Now that the latter runs against the local testnet too we make these land blocking. | |
run-tests-main-branch: | |
needs: [permission-check, file_change_determinator] | |
runs-on: runs-on,cpu=64,family=c7,hdd=500,image=aptos-ubuntu-x64,run-id=${{ github.run_id }} | |
steps: | |
- uses: actions/checkout@v3 | |
if: needs.file_change_determinator.outputs.only_docs_changed != 'true' | |
with: | |
ref: ${{ env.GIT_SHA }} | |
- uses: aptos-labs/aptos-core/.github/actions/docker-setup@main | |
if: needs.file_change_determinator.outputs.only_docs_changed != 'true' | |
with: | |
GCP_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} | |
GCP_SERVICE_ACCOUNT_EMAIL: ${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DOCKER_ARTIFACT_REPO: ${{ secrets.AWS_DOCKER_ARTIFACT_REPO }} | |
GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }} | |
- uses: ./.github/actions/run-ts-sdk-e2e-tests | |
if: needs.file_change_determinator.outputs.only_docs_changed != 'true' | |
with: | |
BRANCH: main | |
GCP_DOCKER_ARTIFACT_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }} | |
- run: echo "Skipping the tests on the main branch! Unrelated changes detected." | |
if: needs.file_change_determinator.outputs.only_docs_changed == 'true' |