generated from oracle/template-repo
-
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.
* added all source code except build files * changed imports from bitbucket to github.com/oracle-samples * Added build and makefile * added release pipeline * changed the order * using explicit token * using docker command directly * using github token * corrected image repo name * using repo from vars and using makefile
- Loading branch information
1 parent
38e4a2a
commit 040bdb2
Showing
3,136 changed files
with
1,075,227 additions
and
36 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
pull_request: {} | ||
push: {} | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17.5 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: build the binary | ||
run: | | ||
go build -mod vendor -o dist/provider ./cmd/server/main.go | ||
- name: Run Unit Tests | ||
run: | | ||
go test -covermode=count -coverprofile=profile.cov ./... | ||
- name: Send coverage | ||
env: | ||
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
GO111MODULE=off go get github.com/mattn/goveralls | ||
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github |
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,34 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
# Build and publish artifacts for a release | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
IMAGE_REGISTRY: ${{ vars.IMAGE_REGISTRY }} | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3.3.0 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: amd64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log into GitHub Container Registry | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${GITHUB_ACTOR,,} --password-stdin | ||
|
||
- name: Build Image | ||
run: IMAGE_REGISTRY="${{ env.IMAGE_REGISTRY }}" make docker-build | ||
|
||
- name: Push Image | ||
run: IMAGE_REGISTRY="${{ env.IMAGE_REGISTRY }}" make docker-push |
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,7 @@ | ||
# Binary folder | ||
dist/ | ||
__debug_bin | ||
# OCI Build folders | ||
input_ocibuild/ | ||
output_ocibuild_dockerize_provider/ | ||
output_ocibuild_make_helm/ |
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,48 @@ | ||
linters: | ||
disable-all: true | ||
enable: | ||
# Linters enabled by default in golangci-lint 1.46.2. | ||
# Default linters are listed explicitly for reproducibility and better control over linting rules. | ||
# It's recommended to revisit this list after golangci-lint updates. | ||
- deadcode | ||
- errcheck | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- staticcheck | ||
- structcheck | ||
- typecheck | ||
- unused | ||
- varcheck | ||
|
||
# Additional linters | ||
- contextcheck # checks whether the function use a non-inherited context | ||
- cyclop # checks function and package cyclomatic complexity | ||
- dupl # detects code duplication/copy-pasting | ||
- funlen # detects long functions | ||
- gocritic # check for bugs, performance and style issues | ||
- gofmt # checks whether code was gofmt-ed | ||
- gosec # inspects source code for security problems | ||
- ireturn # checks that function accept interfaces and return concrete types | ||
- lll # reports long lines | ||
- nilnil # checks that there is no simultaneous return of nil error and an invalid value | ||
- nolintlint # reports ill-formed or insufficient nolint directives | ||
- revive # finds out style issues, drop-in replacement of golint | ||
- tenv # detects using os.Setenv instead of t.Setenv | ||
- thelper # detects Go test helpers without t.Helper() call and checks the consistency of test helpers | ||
|
||
linters-settings: | ||
nolintlint: | ||
# Disable to ensure that nolint directives don't have a leading space, | ||
# because machine-readable comments should have no space by Go convention. | ||
allow-leading-space: false | ||
# Enable to require an explanation of nonzero length after each nolint directive. | ||
require-explanation: true | ||
# Enable to require nolint directives to mention the specific linter being suppressed. | ||
require-specific: true | ||
tenv: | ||
# The option `all` will run against whole test files (`_test.go`) regardless of method/function signatures. | ||
# By default, only methods that take `*testing.T`, `*testing.B`, and `testing.TB` as arguments are checked. | ||
all: true | ||
dupl: | ||
threshold: 200 |
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
Oops, something went wrong.