Skip to content

Commit

Permalink
Merge remote-tracking branch 'flytestdlib/prepare-for-monorepo' into …
Browse files Browse the repository at this point in the history
…prepare-monorepo

Signed-off-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario committed Sep 6, 2023
2 parents 00d8f70 + afecec7 commit 05f7a1d
Show file tree
Hide file tree
Showing 218 changed files with 24,034 additions and 0 deletions.
72 changes: 72 additions & 0 deletions flytestdlib/.github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Master

on:
push:
branches:
- master

jobs:
bump-version:
name: Bump Version
if: github.event.commits[0].author.name != 'goreleaserbot'
runs-on: ubuntu-latest
outputs:
version: ${{ steps.bump-version.outputs.tag }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Bump version and push tag
id: bump-version
uses: flyteorg/github-tag-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch

goreleaser:
name: Goreleaser
runs-on: ubuntu-latest
needs: [ bump-version ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.19'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

tests-lint:
name: Run tests and lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: "0"
- uses: actions/setup-go@v2
with:
go-version: '1.19'
- name: Unit Tests
run: make mod_download && make test_unit_codecov
- name: Push CodeCov
uses: codecov/[email protected]
with:
file: coverage.txt
flags: unittests
fail_ci_if_error: false
- uses: actions/setup-go@v2
with:
go-version: '1.19'
- name: Lint
run: make install && make lint
- name: Bench tests
run: make install && make test_benchmark
45 changes: 45 additions & 0 deletions flytestdlib/.github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Pull Request

on: pull_request

jobs:
tests-lint:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: "0"
- uses: actions/setup-go@v2
with:
go-version: '1.19'
- name: Unit Tests
run: make mod_download && make test_unit_codecov
- name: Push CodeCov
uses: codecov/[email protected]
with:
file: coverage.txt
flags: unittests
fail_ci_if_error: false
- name: Bench tests
run: make install && make test_benchmark
lint:
name: Lint
uses: flyteorg/flytetools/.github/workflows/lint.yml@master
with:
go-version: '1.19'
test-generate-integrity:
name: Ensure go generate has run
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: "0"
- uses: actions/setup-go@v2
with:
go-version: '1.19'
- name: Go generate and diff
run: DELTA_CHECK=true make generate

12 changes: 12 additions & 0 deletions flytestdlib/.github/workflows/upgrade_automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Boilerplate Upgrade Automation
on:
workflow_dispatch:

jobs:
trigger-upgrade:
name: Boilerplate Upgrade Automation
uses: flyteorg/flytetools/.github/workflows/flyte_automation.yml@master
with:
component: boilerplate
secrets:
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}
119 changes: 119 additions & 0 deletions flytestdlib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@

# Temporary Build Files
tmp/_output
tmp/_test


# Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode

### Emacs ###
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*

# Org-mode
.org-id-locations
*_archive

# flymake-mode
*_flymake.*

# eshell files
/eshell/history
/eshell/lastdir

# elpa packages
/elpa/

# reftex files
*.rel

# AUCTeX auto folder
/auto/

# cask packages
.cask/
dist/

# Flycheck
flycheck_*.el

# server auth directory
/server/

# projectiles files
.projectile
projectile-bookmarks.eld

# directory configuration
.dir-locals.el

# saveplace
places

# url cache
url/cache/

# cedet
ede-projects.el

# smex
smex-items

# company-statistics
company-statistics-cache.el

# anaconda-mode
anaconda-mode/

### Go ###
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
vendor/
bin/

# Test binary, build with 'go test -c'
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

### Vim ###
# swap
.sw[a-p]
.*.sw[a-p]
# session
Session.vim
# temporary
.netrwhist
# auto-generated tag files
tags

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history

### GoLand ###
.idea/*

### CodeCov ###
codecov_bash.sh
coverage.txt

# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode

.vscode/*
30 changes: 30 additions & 0 deletions flytestdlib/.golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES.
# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY:
#
# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst

run:
skip-dirs:
- pkg/client

linters:
disable-all: true
enable:
- deadcode
- errcheck
- gas
- goconst
- goimports
- golint
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- staticcheck
- structcheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
69 changes: 69 additions & 0 deletions flytestdlib/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
before:
hooks:
- go mod download
builds:
- env:
- CGO_ENABLED=0
main: ./cli/pflags/main.go
binary: pflags
goos:
- linux
- windows
- darwin
ldflags:
- -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}}
archives:
- name_template: |-
flytestdlib_{{ .Tag }}_
{{- if eq .Os "darwin" }}Darwin
{{- else if eq .Os "linux" }}Linux
{{- else if eq .Os "windows" }}Windows
{{- else }}{{ .Os }}{{ end }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
format: zip
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
# scoop:
# # Default is "https://github.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# # url_template: "http://github.mycompany.com/foo/bar/releases/{{ .Tag }}/{{ .ArtifactName }}"

# # Repository to push the app manifest to.
# bucket:
# owner: lyft
# name: flytestdlib

# # Git author used to commit to the repository.
# # Defaults are shown.
# commit_author:
# name: goreleaserbot
# email: [email protected]

# # Your app's homepage.
# # Default is empty.
# homepage: "https://godoc.org/github.com/flyteorg/flytestdlib"

# # Your app's description.
# # Default is empty.
# description: "Common Go utilities (Typed-Config, PFlags, Prometheus Metrics,... more)."

# # Your app's license
# # Default is empty.
# license: Apache-2.0

# # Persist data between application updates
# persist:
# - "data"
# - "config.toml"
3 changes: 3 additions & 0 deletions flytestdlib/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence.
* @EngHabu @katrogan @kumare3 @wild-endeavor
2 changes: 2 additions & 0 deletions flytestdlib/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This project is governed by LF AI Foundation's [code of conduct](https://lfprojects.org/policies/code-of-conduct/).
All contributors and participants agree to abide by its terms.
Loading

0 comments on commit 05f7a1d

Please sign in to comment.