Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 42 additions & 42 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- CONTRIBUTING.md
Copy link
Contributor Author

@jharley jharley Apr 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YAML linter/formatter got this 🙃

schedule:
# run CI nightly at 00:11UTC
- cron: '11 0 * * *'
- cron: "11 0 * * *"

jobs:
build:
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
go-version-file: "go.mod"
cache: true

- name: Build
Expand All @@ -35,44 +35,44 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true

- name: Setup test environment
env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
HONEYCOMB_DATASET: testacc
run: ./scripts/setup-testsuite-dataset

- name: Run client acceptance tests
timeout-minutes: 10
env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
HONEYCOMB_DATASET: testacc
run: go test -v -coverprofile=client-coverage.txt -covermode=atomic ./client/...

- uses: hashicorp/setup-terraform@v2
with:
# TODO: update to a TF version matrix test once testsuite won't generate conflicting resources
terraform_version: 0.14
terraform_wrapper: false

- name: Run TF acceptance tests
timeout-minutes: 10
env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
HONEYCOMB_DATASET: testacc
TF_ACC: 1
run: go test -v -coverprofile=tf-coverage.txt -covermode=atomic ./honeycombio/...

- name: Generate Coverage Report
uses: codecov/[email protected]
- name: Checkout
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true

- name: Setup test environment
env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
HONEYCOMB_DATASET: testacc
run: ./scripts/setup-testsuite-dataset

- name: Run client acceptance tests
timeout-minutes: 10
env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
HONEYCOMB_DATASET: testacc
run: go test -v -coverprofile=client-coverage.txt -covermode=atomic ./client/...

- uses: hashicorp/setup-terraform@v2
with:
# TODO: update to a TF version matrix test once testsuite won't generate conflicting resources
terraform_version: 0.14
terraform_wrapper: false

- name: Run TF acceptance tests
timeout-minutes: 10
env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
HONEYCOMB_DATASET: testacc
TF_ACC: 1
run: go test -v -coverprofile=tf-coverage.txt -covermode=atomic ./honeycombio/...

- name: Generate Coverage Report
uses: codecov/[email protected]

fmt:
name: Formatting
Expand All @@ -84,14 +84,14 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
go-version-file: "go.mod"
cache: true

- name: Check formatting
run: |
# install goimports from another directory to not touch go.mod
pushd ../
go install golang.org/x/tools/cmd/goimports@v0.1.10
go install golang.org/x/tools/cmd/goimports@v0.8.0
popd

goimports -l -w .
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.18.5
1.19.8
6 changes: 3 additions & 3 deletions client/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ func (s *triggers) Delete(ctx context.Context, dataset string, id string) error
//
// The following properties must be valid:
//
// - the query must contain exactly one calculation
// - the HEATMAP calculation may not be used
// - only the following fields may be set: calculations, breakdown, filters, filter_combination and time_range
// - the query must contain exactly one calculation
// - the HEATMAP calculation may not be used
// - only the following fields may be set: calculations, breakdown, filters, filter_combination and time_range
//
// For more information, refer to https://docs.honeycomb.io/api/triggers/#fields-on-a-trigger
func MatchesTriggerSubset(query *QuerySpec) error {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/honeycombio/terraform-provider-honeycombio

go 1.18
go 1.19

require (
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
Expand Down