Skip to content

Configure Renovate #152

Configure Renovate

Configure Renovate #152

# This workflow will run Terraform init, validate, and plan on Pull Request=
name: Template E2E test
on:
issue_comment:
types: [created]
workflow_dispatch:
env:
PROJECT_ID: ${{ vars.E2E_TEST_PROJECT_ID }}
ORGANIZATION_ID: ${{ secrets.ORGANIZATION_ID }}
REGION: us-central1
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.E2E_TEST_SA_KEY }}
KUSTOMIZE_VERSION: 5.0.1
SKAFFOLD_VERSION: 2.4.1
TERRAFORM_VERSION: 1.4.6
PYTHON_VERSION: 3.9
JOB_ID: ${{ fromJSON(toJSON(github.run_id)) }}
E2E_RUNNER_SA: ${{ vars.E2E_RUNNER_SA }}
jobs:
run_template_e2e_test:
runs-on: ubuntu-latest
environment: e2e-v2
name: Template E2E tests
steps:
- name: Check out repository with main branch
uses: actions/checkout@v3
if: ${{ github.event_name == 'workflow_dispatch' }}
- name: Install gcloud
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{env.PROJECT_ID}}
# https://github.com/google-github-actions/auth
- name: Auth with Service Account
uses: "google-github-actions/auth@v1"
with:
project_id: ${{env.PROJECT_ID}}
credentials_json: "${{ secrets.E2E_TEST_SA_KEY }}"
export_default_credentials: true
- name: Set gcloud to project
run: |
gcloud config set project ${{ env.PROJECT_ID }}
gcloud config list
- name: Install Kustomize
run: |
wget -O kustomize.tar.gz https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v$KUSTOMIZE_VERSION/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz
- name: Install Skaffold release binary
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v$SKAFFOLD_VERSION/skaffold-linux-amd64
sudo install skaffold /usr/local/bin/skaffold
- name: Set default repo for Skaffold
run: |
skaffold config set default-repo "$SKAFFOLD_DEFAULT_REPO"
- uses: hashicorp/setup-terraform@v1
with:
terraform_version: ${{env.TERRAFORM_VERSION}}
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
pip install poetry pytest
- name: Set up poetry
run: |
echo "Current path: $(pwd)"
ls -al
poetry config virtualenvs.create false
poetry install --no-dev
which st
pip freeze
- name: Run E2E Test - prepare
run: |
bash e2e/template_e2e_tests/run_template_e2e.sh prepare
- name: Run E2E Test - deploy
run: |
bash e2e/template_e2e_tests/run_template_e2e.sh deploy
- name: Run E2E Test - test
run: |
bash e2e/template_e2e_tests/run_template_e2e.sh test
- name: Run E2E Test - cleanup
run: |
bash e2e/template_e2e_tests/run_template_e2e.sh cleanup