Skip to content

Commit

Permalink
Update workflow (#37)
Browse files Browse the repository at this point in the history
* update

* update README

* fmt
  • Loading branch information
hirosassa authored Sep 7, 2022
1 parent d61d70b commit 9a5ba30
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 25 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Unshallow
run: git fetch --prune --unshallow
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19
-
name: Import GPG key
id: import_gpg
uses: hashicorp/[email protected]
uses: crazy-max/[email protected]
with:
env:
# These secrets will need to be configured for the repository:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.46.2
version: v1.49.0
check:
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get dependencies
run: go mod download
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ terraform {
required_providers {
looker = {
source = "hirosassa/looker"
version = "0.3.0"
version = "0.8.7"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.6
0.8.7
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/hirosassa/terraform-provider-looker

go 1.17
go 1.19

require (
github.com/hashicorp/terraform-plugin-docs v0.7.0
Expand Down
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/Y
github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I=
github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0=
github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk=
github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec=
github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw=
Expand Down
6 changes: 4 additions & 2 deletions pkg/looker/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

var testAccProviders map[string]*schema.Provider
var testAccProvider *schema.Provider
var (
testAccProviders map[string]*schema.Provider
testAccProvider *schema.Provider
)

func init() {
testAccProvider = Provider()
Expand Down
4 changes: 2 additions & 2 deletions pkg/looker/resource_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func expandWriteDBConnection(d *schema.ResourceData) (*apiclient.WriteDBConnecti

// optional values
if v, ok := d.GetOk("port"); ok {
port := v.(string) // for api breaking change
port := v.(string) // for api breaking change
writeDBConnection.Port = &port
}
if v, ok := d.GetOk("password"); ok {
Expand Down Expand Up @@ -415,7 +415,7 @@ func expandWriteDBConnection(d *schema.ResourceData) (*apiclient.WriteDBConnecti
writeDBConnection.DisableContextComment = &disable_context_comment
}
if v, ok := d.GetOk("oauth_application_id"); ok {
oauthApplicationId := v.(string) // for api breaking change
oauthApplicationId := v.(string) // for api breaking change
writeDBConnection.OauthApplicationId = &oauthApplicationId
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/looker/resource_connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@ func testAccCheckConnectionExists(n string) resource.TestCheckFunc {
connectionName := rs.Primary.ID

_, err := client.Connection(connectionName, "", nil)
if err !=nil {
if err != nil {
return err
}

return nil
}
}

func testAccCheckConnectionDestroy(s *terraform.State) error {
client := testAccProvider.Meta().(*apiclient.LookerSDK)

Expand Down
1 change: 0 additions & 1 deletion pkg/looker/resource_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func testAccCheckGroupDestroy(s *terraform.State) error {
}

return nil

}

func groupConfig(name string) string {
Expand Down
1 change: 0 additions & 1 deletion pkg/looker/resource_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ func resourceUserCreate(ctx context.Context, d *schema.ResourceData, m interface
}
return nil
})

if err != nil {
return diag.FromErr(err)
}
Expand Down
1 change: 1 addition & 0 deletions pkg/tools/tools.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build tools
// +build tools

package tools
Expand Down

0 comments on commit 9a5ba30

Please sign in to comment.