From df0f47b52c8d6dbfcb8813d678888f47fc00516c Mon Sep 17 00:00:00 2001 From: Max Horstmann Date: Thu, 5 Nov 2020 08:55:20 -0500 Subject: [PATCH] Run integration tests for additional DNS providers (#930) --- .github/workflows/build.yml | 49 ++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a71595aeb..69aacd3b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,34 +5,59 @@ on: branches: [ master ] jobs: + build: runs-on: ubuntu-latest steps: - - name: Checkout repo uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Set up Go uses: actions/setup-go@v2 with: go-version: ^1.15 - + - name: Build binaries + run: go run build/build.go - name: Run unit tests run: go test ./... - - name: Run integration tests for BIND provider + integration-tests: + runs-on: ubuntu-latest + needs: build + strategy: + matrix: + provider: [AZURE_DNS, BIND, CLOUDFLAREAPI, GCLOUD, NAMEDOTCOM, ROUTE53] + steps: + - name: Checkout repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ^1.15 + - name: Run integration tests for ${{ matrix.provider }} provider working-directory: integrationTest - run: go test -v -verbose -provider BIND - - - name: Run integration test for ROUTE53 provider - working-directory: integrationTest - run: go test -v -verbose -provider ROUTE53 + run: go test -v -verbose -provider ${{ matrix.provider }} env: + AZURE_RESOURCE_GROUP: DNSControl + AZURE_DOMAIN: dnscontrol-azure.com + AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + CF_DOMAIN: dnscontroltest-cf.com + CF_TOKEN: ${{ secrets.CF_TOKEN }} + GCLOUD_DOMAIN: dnscontroltest-gcloud.com + GCLOUD_TYPE: service_account + GCLOUD_EMAIL: dnscontrol@dnscontrol-dev.iam.gserviceaccount.com + GCLOUD_PROJECT: dnscontrol-dev + GCLOUD_PRIVATEKEY: ${{ secrets.GCLOUD_PRIVATEKEY }} + NAMEDOTCOM_DOMAIN: dnscontrol-ndc.com + NAMEDOTCOM_URL: api.name.com + NAMEDOTCOM_USER: dnscontroltest + NAMEDOTCOM_KEY: ${{ secrets.NAMEDOTCOM_KEY }} R53_DOMAIN: dnscontroltest-r53.com R53_KEY_ID: ${{ secrets.R53_KEY_ID }} R53_KEY: ${{ secrets.R53_KEY }} - - - name: Build binaries - run: go run build/build.go \ No newline at end of file