Merge pull request #608 from cloudflare/dependabot/go_modules/github.… #858
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
on: | |
push: | |
paths-ignore: | |
- 'README.md' | |
- 'CHANGELOG.md' | |
- 'LICENSE' | |
name: Test | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # needed for `only-new-issues` to compare diffs | |
- name: install go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: 'go.mod' | |
- uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: go1.20-${{ hashFiles('**/go.sum') }} | |
- name: Vet | |
run: go vet ./... | |
- name: setup Terraform | |
uses: hashicorp/setup-terraform@v1 | |
- name: write Terraform configuration | |
run: | | |
cat > main.tf <<EOF | |
terraform { | |
required_providers { | |
cloudflare = { | |
source = "cloudflare/cloudflare" | |
version = "~> 4" | |
} | |
} | |
} | |
EOF | |
- name: terraform init | |
run: terraform init | |
- name: go test | |
env: | |
CLOUDFLARE_EMAIL: noone@cloudflare.com | |
CLOUDFLARE_API_KEY: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | |
CLOUDFLARE_TERRAFORM_INSTALL_PATH: ${{ github.workspace }} | |
run: make test |