Skip to content

Revert (#142) Manage contact for registered domains (#149) #116

Revert (#142) Manage contact for registered domains (#149)

Revert (#142) Manage contact for registered domains (#149) #116

Workflow file for this run

name: Tests
on:
push:
branches: [main]
paths-ignore:
- 'README.md'
pull_request:
types: ['opened', 'synchronize']
paths:
- '**.go'
- 'vendor/**'
- '.github/workflows/**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: .go-version
cache: true
- name: Get dependencies
run: go mod download
- name: Build
run: go build -v .
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: .go-version
cache: true
- run: go generate ./...
- name: git diff
run: |
git diff --compact-summary --exit-code || \
(echo; echo "Unexpected difference in directories after code generation. Run 'go generate ./...' command and commit."; exit 1)
test:
name: Terraform Provider Acceptance Tests
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
terraform:
- '1.0.*'
- '1.1.*'
- '1.2.*'
- '1.4.*'
include:
- terraform: '1.0.*'
domain: 'dnsimple-1-0-terraform.bio'
- terraform: '1.1.*'
domain: 'dnsimple-1-1-terraform.bio'
- terraform: '1.2.*'
domain: 'dnsimple-1-2-terraform.bio'
- terraform: '1.4.*'
domain: 'dnsimple-1-4-terraform.bio'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: .go-version
cache: true
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- run: go mod download
- env:
TF_ACC: "1"
DNSIMPLE_SANDBOX: true
DNSIMPLE_ACCOUNT: ${{ secrets.DNSIMPLE_ACCOUNT }}
DNSIMPLE_TOKEN: ${{ secrets.DNSIMPLE_TOKEN }}
DNSIMPLE_DOMAIN: ${{ matrix.domain }}
DNSIMPLE_CONTACT_ID: ${{ secrets.DNSIMPLE_CONTACT_ID }}
run: go test -v -cover ./internal/... -timeout 15m
timeout-minutes: 10
slack-workflow-status:
if: always()
name: Post Workflow Status To Slack
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Slack Workflow Notification
uses: Gamesight/slack-workflow-status@master
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL_DEVELOPMENT}}