Enable Cloud tests back #1596
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: run-tests | |
permissions: write-all | |
on: | |
push: | |
branches: | |
- v1 | |
- main | |
pull_request: | |
branches: | |
- v1 | |
- main | |
jobs: | |
single-node: | |
runs-on: [self-hosted, style-checker] | |
strategy: | |
fail-fast: true | |
matrix: | |
go: | |
- "1.20" | |
- "1.21" | |
clickhouse: # https://github.com/ClickHouse/ClickHouse/blob/master/SECURITY.md#scope-and-supported-versions | |
- "23.3" | |
- "23.6" | |
- "23.7" | |
- "23.8" | |
- "latest" | |
steps: | |
- uses: actions/checkout@main | |
- name: Install Go ${{ matrix.go }} | |
uses: actions/setup-go@v2.1.5 | |
with: | |
stable: false | |
go-version: ${{ matrix.go }} | |
- name: Run tests | |
run: | | |
CLICKHOUSE_VERSION=${{ matrix.clickhouse }} make test | |
integration-tests-cloud: | |
runs-on: [self-hosted, style-checker] | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: true | |
matrix: | |
go: | |
- "1.19" | |
- "1.20" | |
steps: | |
- name: Check Out Code | |
uses: actions/checkout@v3 | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v2.0.3 | |
with: | |
terraform_version: 1.3.4 | |
terraform_wrapper: false | |
- name: Terraform Init | |
id: init | |
run: terraform init | |
- name: Set Service Name | |
run: echo "TF_VAR_service_name=go_client_tests_$(date +'%Y_%m_%d_%H_%M_%S')_${{ matrix.go }}" >> $GITHUB_ENV | |
- name: Terraform Validate | |
id: validate | |
run: terraform validate -no-color | |
- name: Terraform Apply | |
id: apply | |
run: terraform apply -no-color -auto-approve -state=${{ matrix.go }}.tfstate | |
env: | |
TF_VAR_organization_id: ${{ secrets.INTEGRATIONS_TEAM_TESTS_ORGANIZATION_ID }} | |
TF_VAR_token_key: ${{ secrets.INTEGRATIONS_TEAM_TESTS_TOKEN_KEY }} | |
TF_VAR_token_secret: ${{ secrets.INTEGRATIONS_TEAM_TESTS_TOKEN_SECRET }} | |
TF_VAR_service_password: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_PASSWORD }} | |
TF_VAR_api_url: ${{ secrets.INTEGRATIONS_TEAM_TESTS_API_URL }} | |
- name: Set Host | |
run: echo "CLICKHOUSE_HOST=$(terraform output -raw CLICKHOUSE_HOST)" >> $GITHUB_ENV | |
- name: Service Id | |
run: terraform output -raw SERVICE_ID -state=${{ matrix.go }}.tfstate | |
- name: Install Go ${{ matrix.go }} | |
uses: actions/setup-go@v2.1.5 | |
with: | |
stable: false | |
go-version: ${{ matrix.go }} | |
- name: Run tests | |
env: | |
CLICKHOUSE_PASSWORD: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_PASSWORD }} | |
CLICKHOUSE_USE_DOCKER: false | |
CLICKHOUSE_USE_SSL: true | |
run: | | |
CLICKHOUSE_DIAL_TIMEOUT=20 CLICKHOUSE_TEST_TIMEOUT=600s CLICKHOUSE_QUORUM_INSERT=2 make test | |
- name: Cleanup | |
if: always() | |
run: terraform destroy -no-color -auto-approve -state=${{ matrix.go }}.tfstate | |
env: | |
TF_VAR_api_url: ${{ secrets.INTEGRATIONS_TEAM_TESTS_API_URL }} | |
TF_VAR_organization_id: ${{ secrets.INTEGRATIONS_TEAM_TESTS_ORGANIZATION_ID }} | |
TF_VAR_token_key: ${{ secrets.INTEGRATIONS_TEAM_TESTS_TOKEN_KEY }} | |
TF_VAR_token_secret: ${{ secrets.INTEGRATIONS_TEAM_TESTS_TOKEN_SECRET }} | |
TF_VAR_service_password: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_PASSWORD }} |