-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: change structure and fix lint warnings (#3)
* refactor: change structure, fix lint warnings and enhance workflows
- Loading branch information
1 parent
1d30504
commit c898d48
Showing
7 changed files
with
44 additions
and
37 deletions.
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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
on: pull_request | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
main | ||
jobs: | ||
configure: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
go-version: [ '1.15', '1.23' ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go ${{ matrix.go-version }} | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "^1.5" | ||
- run: go version | ||
test: | ||
runs-on: ubuntu-20.04 | ||
needs: configure | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Testing lib | ||
go-version: '^${{ matrix.go-version }}' | ||
- name: Install deps | ||
run: go mod tidy | ||
- name: Test | ||
run: make test | ||
test_bench: | ||
runs-on: ubuntu-20.04 | ||
needs: configure | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Testing with benchmarks | ||
run: make test_bench | ||
- name: Lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.60.3 |
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 |
---|---|---|
|
@@ -13,3 +13,5 @@ | |
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
out |
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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
build: | ||
go build -o ascii-banner | ||
test: | ||
go test ./banner | ||
test_bench: | ||
go test ./banner -bench=. | ||
build: clean | ||
go build -o ./out/ascii-banner ./cmd/... | ||
build-prod: clean | ||
go build -ldflags="-s -w" -o ./out/ascii-banner ./cmd/... | ||
clean: | ||
rm -rf ascii-banner | ||
@rm -rf ./out | ||
format: | ||
go fmt ./... | ||
test: | ||
go test ./... | ||
test-bench: | ||
go test ./... -bench=. |
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module github.com/juniorgarcia/ascii-banner-cli | ||
|
||
go 1.15 | ||
go 1.23.0 | ||
|
||
require github.com/joho/godotenv v1.3.0 |
File renamed without changes.
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