-
Notifications
You must be signed in to change notification settings - Fork 3.7k
74 lines (65 loc) · 3.25 KB
/
faucet-tests-main.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
## IMPORTANT NOTE TO EDITORS OF THIS FILE ##
## If you are trying to change how this CI works, you MUST go read the important
## note at the top of docker-build-test.yaml. In short, to test this, you must temporarily
## change docker-build-test to use the pull_request trigger instead of pull_request_target.
## Make sure to add the CICD:CICD:build-images and CICD:run-e2e-tests labels to test
## this within an in-review PR.
## If the above approach is too slow (since you have to wait for the rust images
## to build), you can cut the iteration time dramatically by changing the envs
## - Replace env.IMAGE_TAG for a known image tag
## - env.GIT_SHA will resolve to that of your PR branch
# These tests ensure that changes to the node don't break compatibility with the faucet.
#
# For tests that prevent changes to the faucet breaking compatibility with the production
# networks, see faucet-tests-prod.
#
# This test uses the node image built from the previous step, hence the workflow_call
# trigger.
name: "Faucet Integration Tests: Main"
on:
# This is called from within the docker-build-test.yaml workflow since we depend
# on the images having been built before this workflow runs.
workflow_call:
inputs:
GIT_SHA:
required: true
type: string
description: Use this to override the git SHA1, branch name (e.g. devnet) or tag to release the SDK from
SKIP_JOB:
required: false
default: false
type: boolean
description: Set to true to skip this job. Useful for PRs that don't require this workflow.
env:
# This is the docker image tag that will be used for the SDK release.
# It is also used to pull the docker images for the CI.
IMAGE_TAG: ${{ inputs.GIT_SHA }}
GIT_SHA: ${{ inputs.GIT_SHA || github.event.pull_request.head.sha || github.sha }} # default to PR branch sha when not running on workflow_call
jobs:
# These tests ensure that the faucet works with a node built from main. If we only
# upgrade devnet if this job is green and we always update the faucet image alongside
# the image for the faucet private fullnode, the faucet and fullnode should always
# be compatible in production.
run-tests-main:
if: contains(github.event.pull_request.labels.*.name, 'CICD:non-required-tests')
runs-on: runs-on,cpu=64,family=c7,hdd=500,image=aptos-ubuntu-x64,run-id=${{ github.run_id }}
steps:
- uses: actions/checkout@v4
if: ${{ !inputs.SKIP_JOB }}
with:
ref: ${{ env.GIT_SHA }}
- uses: aptos-labs/aptos-core/.github/actions/docker-setup@main
if: ${{ !inputs.SKIP_JOB }}
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-faucet-tests
if: ${{ !inputs.SKIP_JOB }}
with:
NETWORK: custom
IMAGE_TAG: ${{ env.IMAGE_TAG }}
GCP_DOCKER_ARTIFACT_REPO: ${{ vars.GCP_DOCKER_ARTIFACT_REPO }}