forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 18
84 lines (70 loc) · 3.41 KB
/
indexer-grpc-integration-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: "Indexer gRPC Integration 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:
# for push events we use `github.sha` in the concurrency group and don't really cancel each other out/limit concurrency
# for pull_request events newer jobs cancel earlier jobs to save on CI etc.
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
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.
run-tests-local-testnet:
if: contains(github.event.pull_request.labels.*.name, 'CICD:non-required-tests')
needs: [permission-check]
runs-on: runs-on,cpu=64,family=c7,hdd=500,image=aptos-ubuntu-x64,run-id=${{ github.run_id }}
env:
# spin up the local testnet using the latest devnet image
VALIDATOR_IMAGE_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}/validator
FAUCET_IMAGE_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}/faucet
INDEXER_GRPC_IMAGE_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}/indexer-grpc
IMAGE_TAG: devnet
steps:
- uses: actions/checkout@v3
- name: Install grpcurl
run: curl -sSL "https://github.com/fullstorydev/grpcurl/releases/download/v1.8.7/grpcurl_1.8.7_linux_x86_64.tar.gz" | sudo tar -xz -C /usr/local/bin
- name: Set up Rust
uses: aptos-labs/aptos-core/.github/actions/rust-setup@main
with:
GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }}
- uses: aptos-labs/aptos-core/.github/actions/docker-setup@main
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/python-setup
with:
pyproject_directory: ./testsuite
- name: Run indexer gRPC dependencies locally (devnet)
shell: bash
working-directory: ./testsuite
run: poetry run python indexer_grpc_local.py --verbose start --no-indexer-grpc
- name: Run indexer gRPC integration tests
shell: bash
run: cargo nextest run --features integration-tests --package aptos-indexer-grpc-integration-tests
- name: Print docker-compose indexer-grpc deps logs on failure
if: ${{ failure() }}
working-directory: docker/compose/indexer-grpc
run: docker-compose logs
- name: Print docker-compose validator-testnet logs on failure
if: ${{ failure() }}
working-directory: docker/compose/validator-testnet
run: docker-compose logs
# validator-testnet-validator-1