Functional Tests #258
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: Functional Tests | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: "Branch to checkout the code from" | |
required: true | |
default: "main" | |
workflow_run: | |
workflows: [Functional Tests Approval] | |
types: | |
- completed | |
env: | |
# Go version to install | |
GOVER: '^1.22' | |
GOPROXY: https://proxy.golang.org | |
# gotestsum version - see: https://github.com/gotestyourself/gotestsum | |
GOTESTSUMVERSION: 1.10.0 | |
# github contexts | |
GH_RUN_ID: ${{ github.run_id }} | |
GH_RUN_NUMBER: ${{ github.run_number }} | |
GH_RUN_ATTEMPT: ${{ github.run_attempt }} | |
# Cloud account fields | |
PARAGLIDER_GCP_PROJECT_PARENT: ${{ secrets.GCP_FOLDER_ID }} | |
PARAGLIDER_GCP_PROJECT_BILLING_ACCOUNT_NAME: ${{ secrets.GCP_BILLING_ACCOUNT_NAME }} | |
PARAGLIDER_AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
PARAGLIDER_AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} | |
jobs: | |
functional-tests: | |
name: Functional Tests | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
contents: read | |
id-token: write | |
pull-requests: write | |
steps: | |
- name: Download commit SHA artifact | |
if: github.event_name == 'workflow_run' | |
uses: dawidd6/action-download-artifact@v6 | |
with: | |
name: commit_sha | |
run_id: ${{ github.event.workflow_run.id }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract commit SHA | |
if: github.event_name == 'workflow_run' | |
run: | | |
echo "CHECKOUT_REF=$(cat commit_sha)" >> $GITHUB_ENV | |
- name: Get checkout ref from input | |
if: github.event_name == 'workflow_dispatch' | |
run: | | |
echo "CHECKOUT_REF=${{ github.event.inputs.branch }}" >> $GITHUB_ENV | |
- name: Add to check run | |
uses: LouisBrunner/[email protected] | |
if: always() | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: Functional Tests | |
status: in_progress | |
repo: ${{ github.repository }} | |
sha: ${{ steps.extract-commit-sha.outputs.commit_sha }} | |
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ env.CHECKOUT_REF }} | |
- name: Set up Go ${{ env.GOVER }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GOVER }} | |
- name: Get protoc | |
uses: arduino/setup-protoc@v3 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get protoc-gen-go | |
run: | | |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest | |
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest | |
- name: Make build | |
run: | | |
make build | |
- name: Authenticate to GCP | |
uses: google-github-actions/auth@v2 | |
with: | |
workload_identity_provider: 'projects/112338121957/locations/global/workloadIdentityPools/github/providers/paraglider' | |
service_account: '[email protected]' | |
- name: Authenticate to Azure | |
uses: azure/login@v2 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Authenticate to AWS | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: us-east-2 | |
role-to-assume: arn:aws:iam::952501545072:role/github | |
- name: Run integration tests | |
run: | | |
make integration-test | |
- name: Run multicloud tests | |
run: | | |
make multicloud-test | |
- name: Update check run with result | |
uses: LouisBrunner/[email protected] | |
if: always() | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: Functional Tests | |
repo: ${{ github.repository }} | |
sha: ${{ steps.extract-commit-sha.outputs.commit_sha }} | |
status: completed | |
conclusion: ${{ job.status }} | |
output: | | |
{"summary":"Functional tests completed. See links for more information.","title":"Functional Tests"} | |
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |