Improve startup speed #3978
Workflow file for this run
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
name: Tanzu CLI Core E2E Tests | |
on: | |
pull_request: | |
branches: [main, release-*] | |
push: | |
branches: [ main, test*, release-*] | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
- "v[0-9]+.[0-9]+.[0-9]+-*" | |
- "test/e2e/framework/v[0-9]+.[0-9]+.[0-9]+" | |
- "test/e2e/framework/v[0-9]+.[0-9]+.[0-9]+-*" | |
jobs: | |
build: | |
name: Tanzu CLI Core E2E Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v1 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21 | |
id: go | |
- name: go cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Setup gcloud account | |
env: | |
GCP_SA: ${{ secrets.GCP_SA }} | |
GCP_PROJECT_NAME: ${{ secrets.GCP_PROJECT_NAME }} | |
run: | | |
if [ -n "$GCP_SA" ]; then | |
# Download and install Google Cloud SDK | |
wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz | |
tar zxvf google-cloud-sdk.tar.gz && ./google-cloud-sdk/install.sh --usage-reporting=false --path-update=true | |
PATH="google-cloud-sdk/bin:${PATH}" | |
gcloud --quiet components update | |
echo $GCP_SA > ${HOME}/gcloud-service-key.json | |
gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json | |
cat ${HOME}/gcloud-service-key.json | docker login -u _json_key --password-stdin https://gcr.io | |
gcloud config set project $GCP_PROJECT_NAME | |
fi | |
- name: Setup dependencies | |
run: | | |
make tools | |
echo "${PWD}/hack/tools/bin" >> $GITHUB_PATH | |
echo "${PWD}/google-cloud-sdk/bin" >> $GITHUB_PATH | |
echo "${PWD}/bin" >> $GITHUB_PATH | |
- name: Build CLI Core | |
run: | | |
make build | |
- name: Start local OCI registry | |
run: | | |
make start-test-central-repo | |
- name: Run CLI E2E Tests | |
env: | |
TANZU_API_TOKEN: ${{ secrets.TANZU_API_TOKEN }} | |
TANZU_CLI_TMC_UNSTABLE_URL: ${{ secrets.TANZU_CLI_TMC_UNSTABLE_URL }} | |
CRD_PACKAGE_IMAGE : ${{ secrets.CRD_PACKAGE_IMAGE_FOR_TEST }} | |
run: | | |
make e2e-cli-core | |
- name: Tests Results Summary | |
if: always() | |
run: | | |
TEST_RESULTS_MD=$(./hack/scripts/process-ginkgo-test-results.sh ./test/e2e/testresults) | |
echo "$TEST_RESULTS_MD" >> $GITHUB_STEP_SUMMARY | |
if [[ $TEST_RESULTS_MD == *":x:"* ]]; then | |
exit 1 | |
fi |