mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-13 02:50:27 +08:00
70 lines
2.2 KiB
YAML
70 lines
2.2 KiB
YAML
name: build
|
|
|
|
on:
|
|
pull_request:
|
|
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, NAMEDOTCOM, ROUTE53]
|
|
exclude:
|
|
- provider: DIGITALOCEAN # remove when #636 is fixed
|
|
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 }}
|
|
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 }}
|