-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
140 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,21 @@ on: | |
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
issue_comment: | ||
types: | ||
- created | ||
- edited | ||
pull_request_review_comment: | ||
types: | ||
- created | ||
- edited | ||
|
||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
if: github.event.issue.pull_request && contains(github.event.comment.body, 'retest please') | ||
timeout-minutes: 5 | ||
|
||
strategy: | ||
|
@@ -43,46 +53,119 @@ jobs: | |
- name: Build | ||
run: make build | ||
lint: | ||
name: 'Terraform Provider quality gate :: Code analysis.' | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: github.event.issue.pull_request && contains(github.event.comment.body, 'retest please') | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: Run linters | ||
uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 # v3.6.0 | ||
with: | ||
version: latest | ||
args: --timeout 3m | ||
|
||
test: | ||
name: 'Terraform Provider Acceptance Tests (OS: ${{ matrix.os }} / TF: ${{ matrix.terraform }})' | ||
needs: build | ||
needs: lint | ||
runs-on: ${{ matrix.os }} | ||
if: github.event.issue.pull_request && contains(github.event.comment.body, 'retest please') | ||
timeout-minutes: 15 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-latest | ||
- windows-latest | ||
- ubuntu-latest | ||
#- windows-latest | ||
#- ubuntu-latest | ||
terraform: | ||
- '1.0.*' | ||
- '1.1.*' | ||
- '1.2.*' | ||
- '1.3.*' | ||
- '1.4.*' | ||
#- '1.1.*' | ||
#- '1.2.*' | ||
#- '1.3.*' | ||
#- '1.4.*' | ||
|
||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version-file: 'go.mod' | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Setup Terraform ${{ matrix.terraform }} | ||
uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3 | ||
with: | ||
terraform_version: ${{ matrix.terraform }} | ||
terraform_wrapper: false | ||
- name: Setup Terraform ${{ matrix.terraform }} | ||
uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3 | ||
with: | ||
terraform_version: ${{ matrix.terraform }} | ||
terraform_wrapper: false | ||
|
||
- name: Run acceptance test | ||
run: make testacc | ||
- name: Go Coverage | ||
uses: gwatts/[email protected] | ||
with: | ||
coverage-threshold: 5.7 # current (2023.08.03) state, should be increased - ideally up to at least 50% - as soon as possible | ||
cover-pkg: ./... | ||
ignore-pattern: | | ||
/cdp-sdk-go/ | ||
/main.go$ | ||
- name: Run acceptance test | ||
run: make testacc | ||
coverage: | ||
name: 'Terraform Provider quality gate :: unit test coverage.' | ||
needs: test | ||
runs-on: ubuntu-latest | ||
if: github.event.issue.pull_request && contains(github.event.comment.body, 'retest please') | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: Go Coverage | ||
uses: gwatts/[email protected] | ||
with: | ||
coverage-threshold: 6.7 # current (2023.08.03) state, should be increased - ideally up to at least 50% - as soon as possible | ||
#cover-pkg: ./... | ||
# ----------------------- | ||
|
||
# test: | ||
# name: 'Terraform Provider Acceptance Tests (OS: ${{ matrix.os }} / TF: ${{ matrix.terraform }})' | ||
# needs: lint | ||
# runs-on: ${{ matrix.os }} | ||
# timeout-minutes: 15 | ||
# | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# os: | ||
# - macos-latest | ||
# - windows-latest | ||
# - ubuntu-latest | ||
# terraform: | ||
# - '1.0.*' | ||
# - '1.1.*' | ||
# - '1.2.*' | ||
# - '1.3.*' | ||
# - '1.4.*' | ||
# | ||
# steps: | ||
# - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
# - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
# with: | ||
# go-version-file: 'go.mod' | ||
# | ||
# - name: Setup Terraform ${{ matrix.terraform }} | ||
# uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3 | ||
# with: | ||
# terraform_version: ${{ matrix.terraform }} | ||
# terraform_wrapper: false | ||
# | ||
# - name: Run acceptance test | ||
# run: make testacc | ||
# coverage: | ||
# name: 'Terraform Provider quality gate :: unit test coverage.' | ||
# needs: test | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
# - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
# with: | ||
# go-version-file: 'go.mod' | ||
# - name: Go Coverage | ||
# uses: gwatts/[email protected] | ||
# with: | ||
# coverage-threshold: 6.7 # current (2023.08.03) state, should be increased - ideally up to at least 50% - as soon as possible | ||
# #cover-pkg: ./... |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2023 Cloudera. All Rights Reserved. | ||
// | ||
// This file is licensed under the Apache License Version 2.0 (the "License"). | ||
// You may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS | ||
// OF ANY KIND, either express or implied. Refer to the License for the specific | ||
// permissions and limitations governing your use of the file. | ||
|
||
package datalake | ||
|
||
import ( | ||
"fmt" | ||
"testing" | ||
) | ||
|
||
func TestDummy(t *testing.T) { | ||
//t.Errorf("Not even a dummy works ¯\\_(ツ)_/¯") | ||
a := SomethingToTest(1, 2) | ||
fmt.Println(a) | ||
} |