dnscontrol/.github/workflows/build.yml

75 lines
2.3 KiB
YAML
Raw Normal View History

name: build
on:
pull_request:
branches: [ master ]
push:
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 ./...
integration-tests:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
provider: [AZURE_DNS, BIND, CLOUDFLAREAPI, DIGITALOCEAN, GANDI_V5, GCLOUD, HEXONET, 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 ${{ 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 }}
DO_DOMAIN : dnscontrol-do.com
DO_TOKEN : ${{ secrets.DO_TOKEN }}
GANDI_V5_DOMAIN : dnscontroltest-gandilivedns.com
GANDI_V5_APIKEY : ${{ secrets.GANDI_V5_APIKEY }}
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 }}
HEXONET_DOMAIN : a-b-c-movies.com
HEXONET_ENTITY : OTE
HEXONET_PW : test.passw0rd
HEXONET_UID : test.user
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 }}