Skip to content

Commit

Permalink
add github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
1pkg committed Oct 22, 2021
1 parent e91e1e6 commit a815e2e
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 5 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: lint
on: [push, pull_request]
jobs:
lint:
strategy:
matrix:
go-version: [1.16.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: setup
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.31
args: -E misspell -E golint
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go-version: [1.16.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: setup
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: checkout
uses: actions/checkout@v2
- name: test
run: go test -v -race -count=1 -coverprofile test.cover ./...
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) Kostiantyn Masliuk

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
8 changes: 4 additions & 4 deletions generators/bubbletea/drvier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ func init() {
if err != nil {
log.Fatal(err)
}
_, _ = internal.GoExec("go get github.com/charmbracelet/bubbletea")(context.TODO(), dir)
_, _ = internal.GoExec("go get github.com/charmbracelet/bubbles")(context.TODO(), dir)
_, _ = internal.GoExec("go get github.com/charmbracelet/lipgloss")(context.TODO(), dir)
_, _ = internal.GoExec("go get github.com/atotto/clipboard")(context.TODO(), dir)
_, _ = internal.GoExec("get github.com/charmbracelet/bubbletea")(context.TODO(), dir)
_, _ = internal.GoExec("get github.com/charmbracelet/bubbles")(context.TODO(), dir)
_, _ = internal.GoExec("get github.com/charmbracelet/lipgloss")(context.TODO(), dir)
_, _ = internal.GoExec("get github.com/atotto/clipboard")(context.TODO(), dir)
}

func TestBubbleTeaDriver(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion generators/gofire/tokenize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestTokenize(t *testing.T) {
"az": "az-bd",
},
},
"mixture of valid params tokens at the beggining should return expected result": {
"mixture of valid params tokens at the beginning should return expected result": {
tokens: []string{"100", `"zzz"`, "true", "--dd=aaaa", "--fff", "20.20", "--az", "az-bd"},
args: []string{"100", `"zzz"`, "true"},
flags: map[string]string{
Expand Down

0 comments on commit a815e2e

Please sign in to comment.