diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index d440e14a..16a9dcd0 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -35,15 +35,15 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 -# - name: Store test timestamp -# run: echo "TIMESTAMP=$(date +'%s')" >> $GITHUB_ENV -# - name: Setup test repository SSH key -# run: | -# mkdir -p ${{ env.SSH_PATH }} -# (base64 -d <<< ${{ secrets.E2E_REPO_PRIVATE_KEY }}) > ${{ env.VENOM_VAR_gitRepoPrivateKeyPath }} -# chmod 600 ${{ env.VENOM_VAR_gitRepoPrivateKeyPath }} -# eval "$(ssh-agent -s)" -# ssh-add ${{ env.VENOM_VAR_gitRepoPrivateKeyPath }} + - name: Store test timestamp + run: echo "TIMESTAMP=$(date +'%s')" >> $GITHUB_ENV + - name: Setup test repository SSH key + run: | + mkdir -p ${{ env.SSH_PATH }} + (base64 -d <<< ${{ secrets.E2E_REPO_PRIVATE_KEY }}) > ${{ env.VENOM_VAR_gitRepoPrivateKeyPath }} + chmod 600 ${{ env.VENOM_VAR_gitRepoPrivateKeyPath }} + eval "$(ssh-agent -s)" + ssh-add ${{ env.VENOM_VAR_gitRepoPrivateKeyPath }} # - name: Decode and save Google service account to a file/env var # run: (base64 -d <<< ${{ secrets.E2E_GCP_SA_KEY }}) > ${{ env.E2E_GCP_SA_KEY_FILE }} - name: GCloud Auth @@ -55,44 +55,42 @@ jobs: uses: google-github-actions/setup-gcloud@v2 with: version: '>= 363.0.0' - - name: Use gcloud CLI - run: gcloud info -# - name: Setup Go -# uses: actions/setup-go@v4.1.0 -# with: -# go-version-file: go.mod -# - name: Add GOBIN to PATH -# run: echo $GOBIN >> $GITHUB_PATH -# - name: Setup Venom -# run: | -# curl https://github.com/ovh/venom/releases/download/v1.2.0/venom.linux-amd64 -L -o ${{ env.VENOM_PATH }} -# chmod +x ${{ env.VENOM_PATH }} -# venom version -# - name: Setup Plural CLI -# run: | -# make install-cli -# mkdir -p ${{ env.VENOM_VAR_pluralHome }} -# plural version -# - name: Print Terraform version -# run: terraform --version -# - name: Print Google Cloud CLI version -# run: gcloud --version + - name: Setup Go + uses: actions/setup-go@v4.1.0 + with: + go-version-file: go.mod + - name: Add GOBIN to PATH + run: echo $GOBIN >> $GITHUB_PATH + - name: Setup Venom + run: | + curl https://github.com/ovh/venom/releases/download/v1.2.0/venom.linux-amd64 -L -o ${{ env.VENOM_PATH }} + chmod +x ${{ env.VENOM_PATH }} + venom version + - name: Setup Plural CLI + run: | + make install-cli + mkdir -p ${{ env.VENOM_VAR_pluralHome }} + plural version + - name: Print Terraform version + run: terraform --version + - name: Print Google Cloud CLI version + run: gcloud --version - name: Create Google Project run: gcloud -q projects create plural-e2e-ci-test --name="E2E Debug" --organization=${{ secrets.E2E_GCP_ORG_ID }} --labels=type=e2e -# - name: Run tests -# env: -# VENOM_VAR_provider: gcp -# VENOM_VAR_region: us-central1 -# VENOM_VAR_gcpEmail: ${{ secrets.E2E_GCP_EMAIL }} -# # VENOM_VAR_gcpSAKeyFile: ${{ secrets.E2E_GCP_SA_KEY_FILE }} -# VENOM_VAR_gcpOrgID: ${{ secrets.E2E_GCP_ORG_ID }} -# VENOM_VAR_gcpBillingID: ${{ secrets.E2E_GCP_BILLING_ID }} -# VENOM_VAR_project: e2e-${{ env.TIMESTAMP }} -# VENOM_VAR_branch: e2e-${{ env.TIMESTAMP }}-gcp -# VENOM_VAR_username: ${{ secrets.E2E_GCP_SA_USERNAME }} -# VENOM_VAR_email: ${{ secrets.E2E_GCP_SA_EMAIL }} -# VENOM_VAR_token: ${{ secrets.E2E_GCP_SA_TOKEN }} -# run: venom run -vv --html-report --format=json --output-dir ${{ env.TESTOUT_PATH }} test/plural + - name: Run tests + env: + VENOM_VAR_provider: gcp + VENOM_VAR_region: us-central1 + VENOM_VAR_gcpEmail: ${{ secrets.E2E_GCP_EMAIL }} + # VENOM_VAR_gcpSAKeyFile: ${{ secrets.E2E_GCP_SA_KEY_FILE }} + VENOM_VAR_gcpOrgID: ${{ secrets.E2E_GCP_ORG_ID }} + VENOM_VAR_gcpBillingID: ${{ secrets.E2E_GCP_BILLING_ID }} + VENOM_VAR_project: e2e-${{ env.TIMESTAMP }} + VENOM_VAR_branch: e2e-${{ env.TIMESTAMP }}-gcp + VENOM_VAR_username: ${{ secrets.E2E_GCP_SA_USERNAME }} + VENOM_VAR_email: ${{ secrets.E2E_GCP_SA_EMAIL }} + VENOM_VAR_token: ${{ secrets.E2E_GCP_SA_TOKEN }} + run: venom run -vv --html-report --format=json --output-dir ${{ env.TESTOUT_PATH }} test/plural # - name: Post a slack message on finish # uses: slackapi/slack-github-action@v2.0.0 # with: