Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/adjust directories #5

Merged
merged 71 commits into from
Dec 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
2bf1a50
change directory structure
kenzo0107 Nov 28, 2019
c1e65cf
update url golint
kenzo0107 Nov 28, 2019
5e0d9af
version up
kenzo0107 Nov 28, 2019
a87eb3b
Add environment value for credentials path
kenzo0107 Nov 29, 2019
d4ce53b
get profiles from credentilas path
kenzo0107 Dec 3, 2019
7738949
get profiles from credentilas and select profile by fuzzyfinder
kenzo0107 Dec 3, 2019
c317301
:gear: install google/go-cmp, termbox-go
kenzo0107 Dec 3, 2019
196ebfd
fmt.Println to log.Println
kenzo0107 Dec 3, 2019
3966588
Show test coverage
kenzo0107 Dec 3, 2019
24db01d
Add testing about select profile with fuzzyfinder
kenzo0107 Dec 3, 2019
c8806fe
Add testing about strings replacement
kenzo0107 Dec 3, 2019
a7670df
Add testing about empty credentials path
kenzo0107 Dec 4, 2019
754ab81
Add svc parameter in args for testing
kenzo0107 Dec 5, 2019
194b40b
Add testdata
kenzo0107 Dec 5, 2019
6cb7930
Change private method from NewSession to newSession
kenzo0107 Dec 5, 2019
c243510
Add Testing
kenzo0107 Dec 5, 2019
57cf782
Add method that typing keys on termbox for Testing
kenzo0107 Dec 5, 2019
e493481
Set credentials path if value AWS_SHARED_CREDENTIALS_FILE is set
kenzo0107 Dec 5, 2019
5acf289
go mod tidy
kenzo0107 Dec 8, 2019
5a3d321
Add golint, gotest to GitHub WorkFlow
kenzo0107 Dec 8, 2019
708c10c
typo
kenzo0107 Dec 8, 2019
4882a9c
typo
kenzo0107 Dec 8, 2019
093bf6b
install golint on github actions
kenzo0107 Dec 8, 2019
87f21d8
Add step "Install dependencies" on GitHub Actions
kenzo0107 Dec 8, 2019
0faf0a9
Add static check to GitHub Actions
kenzo0107 Dec 8, 2019
8d36f16
static check on ubuntu-latest only
kenzo0107 Dec 8, 2019
2eb8cad
Add static checks
kenzo0107 Dec 8, 2019
2a0fc0d
go mod tidy
kenzo0107 Dec 8, 2019
7650c7a
:gear: Add staticcheck
kenzo0107 Dec 8, 2019
553759e
Add staticcheck
kenzo0107 Dec 8, 2019
42a3bce
Beat the staticcheck offences
kenzo0107 Dec 8, 2019
a928cbf
:gear: update package
kenzo0107 Dec 8, 2019
7298dc2
:gear: Install errcheck, shadow, gosec
kenzo0107 Dec 8, 2019
129ec27
Beat the shadow offence
kenzo0107 Dec 8, 2019
3aca0b1
Remove step "Install dependencies"
kenzo0107 Dec 9, 2019
6d7813e
Add errcheck
kenzo0107 Dec 9, 2019
6f2dfcf
Beat the errcheck offences
kenzo0107 Dec 9, 2019
ceee8dd
Add gosec
kenzo0107 Dec 10, 2019
af93c1d
Beat the gosec offence
kenzo0107 Dec 10, 2019
6992c0d
Add testing for pkg/awsapi/ec2.go
kenzo0107 Dec 10, 2019
e34fa7e
Delete no required files
kenzo0107 Dec 10, 2019
eddce1f
No required log output
kenzo0107 Dec 10, 2019
f946ed4
execute method via client
kenzo0107 Dec 12, 2019
1db3c39
use session.Must
kenzo0107 Dec 12, 2019
879d885
execute method via client
kenzo0107 Dec 12, 2019
4dcab70
Remove no required log
kenzo0107 Dec 12, 2019
cae8c2e
Add mfa_serial etc... to testdata/credentials
kenzo0107 Dec 12, 2019
152e838
Add testing sshkey private/public key cached
kenzo0107 Dec 12, 2019
fc4d8c3
divide ssh connect steps
kenzo0107 Dec 13, 2019
5ed32db
Delete debug log
kenzo0107 Dec 13, 2019
547a125
do GitHub Actions Workflow triggered on git push only
kenzo0107 Dec 13, 2019
017b036
Adjust for Windows Line feed code
kenzo0107 Dec 13, 2019
c8b1f4c
:gear: install kr/pty
kenzo0107 Dec 14, 2019
0cf3011
Add testing of ssh connect
kenzo0107 Dec 14, 2019
4491d84
execute gosec excluding G106: ssh.InsecureIgnoreHostKey
kenzo0107 Dec 14, 2019
b148425
change method name a little
kenzo0107 Dec 14, 2019
6fadbaa
Add NewDevice
kenzo0107 Dec 14, 2019
82546cb
Add output test coverage and show html format
kenzo0107 Dec 14, 2019
524bd59
Add cover.out to .gitignore
kenzo0107 Dec 14, 2019
e266543
show error detail
kenzo0107 Dec 14, 2019
808eff2
TestSSHConnect shows error details.
kenzo0107 Dec 14, 2019
e4c5d57
set test port
kenzo0107 Dec 14, 2019
7751d08
Specify test target go version 1.13.x
kenzo0107 Dec 14, 2019
b094f52
static check triggered on git push
kenzo0107 Dec 14, 2019
a41565d
Change variable err to e in no name func
kenzo0107 Dec 14, 2019
1dc106f
update comment for StartShell method
kenzo0107 Dec 15, 2019
6db7fbe
Add func that get available port
kenzo0107 Dec 15, 2019
37a8bee
close listener
kenzo0107 Dec 15, 2019
2a0fd87
delete ubuntu-latest on test
kenzo0107 Dec 16, 2019
bd226c6
Fix undefined: pty.Start on windows-latest
kenzo0107 Dec 17, 2019
a15263d
Merge branch 'master' into feature/adjust_directories
kenzo0107 Dec 17, 2019
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
70 changes: 70 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: static check
on: push

jobs:
imports:
name: Imports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/golang-github-actions@v1.1.0
with:
run: imports
token: ${{ secrets.GITHUB_TOKEN }}

errcheck:
name: Errcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/golang-github-actions@v1.1.0
with:
run: errcheck
token: ${{ secrets.GITHUB_TOKEN }}

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/golang-github-actions@v1.1.0
with:
run: lint
token: ${{ secrets.GITHUB_TOKEN }}

shadow:
name: Shadow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/golang-github-actions@v1.1.0
with:
run: shadow
token: ${{ secrets.GITHUB_TOKEN }}

staticcheck:
name: StaticCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/golang-github-actions@v1.1.0
with:
run: staticcheck
token: ${{ secrets.GITHUB_TOKEN }}

sec:
name: Sec
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/golang-github-actions@v1.1.0
with:
run: sec
token: ${{ secrets.GITHUB_TOKEN }}
flags: "-exclude=G106"
8 changes: 4 additions & 4 deletions .github/workflows/go.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
on: [push, pull_request]
name: Test
on: [push]
jobs:
test:
strategy:
matrix:
go-version: [1.12.x, 1.13.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
go-version: [1.13.x]
platform: [macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
Expand All @@ -15,4 +15,4 @@ jobs:
- name: Checkout code
uses: actions/checkout@v1
- name: Test
run: go vet ./...
run: go test -v -count=1 -cover ./...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.envrc
cmd/omssh/omssh
bin/*
cover.out
dist
21 changes: 17 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,35 @@ deps:
go get -v -d

## Setup
.PHONY: deps
.PHONY: devel-deps
devel-deps: deps
GO111MODULE=off go get \
github.com/golang/lint/golint \
golang.org/x/lint/golint \
honnef.co/go/tools/staticcheck \
github.com/kisielk/errcheck \
golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow \
github.com/securego/gosec/cmd/gosec \
github.com/motemen/gobump/cmd/gobump \
github.com/Songmu/make2help/cmd/make2help

## Run tests
.PHONY: test
test: deps
go test ./...
go test -v -count=1 -cover ./...

.PHONY: cov
cov:
go test -coverprofile=cover.out ./...
go tool cover -html=cover.out

## Lint
.PHONY: lint
lint: devel-deps
go vet ./...
staticcheck ./...
errcheck ./...
# exclude G106: Audit the use of ssh.InsecureIgnoreHostKey
gosec -quiet -exclude=G106 ./...
golint -set_exit_status ./...

## build binaries ex. make bin/omssh
Expand All @@ -50,10 +63,10 @@ help:
.PHONY: clean
clean:
rm -f bin/${NAME}
rm -f pkg/*

.PHONY: release
release:
@git tag v$(VERSION)
@git push --tags
goreleaser --rm-dist

Loading