Skip to content

Commit

Permalink
Github action
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefuertes committed Oct 31, 2024
1 parent a34275b commit 3b03643
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ jobs:
with:
go-version: 1.23


- name: Checkout code
uses: actions/checkout@v3

- name: go vet
run: go vet ./...

- name: staticcheck
uses: dominikh/staticcheck-action@v1.3.0

- name: golangci-lint
uses: golangci/golangci-lint-action@v3

- name: Get Repo Name
id: get_repo_name
run: |
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: test

permissions:
contents: read

on:
- push
- pull_request

jobs:
test:
name: Test the code
runs-on: ubuntu-latest

steps:
- name: Set up Go
id: go
uses: actions/setup-go@v3
with:
go-version: 1.23

- name: Checkout code
uses: actions/checkout@v3

- name: run tests
run: |
go mod tidy
go test -v ./...
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ require github.com/urfave/cli/v2 v2.27.5
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

require (
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/fatih/color v1.17.0
github.com/fatih/color v1.18.0
github.com/joho/godotenv v1.5.1
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/olekukonko/tablewriter v0.0.5
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/stretchr/testify v1.9.0
Expand Down

0 comments on commit 3b03643

Please sign in to comment.