Skip to content

Commit

Permalink
refactor(golangci): rm temporary lint from github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Excoriate committed Sep 12, 2022
1 parent aeaeb6d commit 39f4aa6
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/ci-app.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: 'CI: App'
name: 'CI: CLI'

on: [push, pull_request]

Expand All @@ -20,7 +20,7 @@ jobs:
runs-on: ${{ matrix.platform }}
defaults:
run:
working-directory: app/microservice
working-directory: app/cli

steps:
- name: Checkout Repository
Expand Down Expand Up @@ -48,33 +48,33 @@ jobs:
run: |
go test -v -cover -race -timeout 120s ./...
lint:
name: Linter
needs: [ci]

runs-on: ubuntu-latest
defaults:
run:
working-directory: app/microservice

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Run Linter
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.46.2
/home/runner/go/bin/golangci-lint --version
/home/runner/go/bin/golangci-lint run ./... --color always -v
# lint:
# name: Linter
# needs: [ci]
#
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: app/cli
#
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v2
#
# - name: Setup Go
# uses: actions/setup-go@v3
# with:
# go-version: 1.18
#
# - name: Run Linter
# run: |
# curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.46.2
# /home/runner/go/bin/golangci-lint --version
# /home/runner/go/bin/golangci-lint run ./... --color always -v

build-binary:
name: Build Binary
needs: [ci, lint]
needs: [ci]

strategy:
matrix:
Expand All @@ -84,7 +84,7 @@ jobs:
runs-on: ${{ matrix.platform }}
defaults:
run:
working-directory: app/microservice
working-directory: app/cli

steps:
- name: Checkout Repository
Expand All @@ -98,7 +98,7 @@ jobs:
- name: Go build
run: |
go mod tidy
go build -v -o dist/amigo-cli-ci
go build -v -o dist/glonner
- name: Setup GoReleaser
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
- name: Build
id: build-and-run
run: |
docker build -t helloworld-svc:latest .
docker build -t glonner:latest .
2 changes: 1 addition & 1 deletion .github/workflows/generate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
defaults:
run:
shell: bash
working-directory: app/microservice
working-directory: app/cli

permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion TaskFile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ tasks:
dir: app/cli
cmds:
- goreleaser check
- goreleaser release --rm-dist
- export GITHUB_TOKEN=${GITHUB_TOKEN} && goreleaser release --rm-dist

pre-commit:
cmds:
Expand Down
2 changes: 1 addition & 1 deletion app/cli/pkg/clients/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (g Client) GetAuth(token string) (map[string][]string, error) {
auth := make(map[string][]string)

if token == "" {
return nil, errors.New("Token is required (use --token or set GITHUB_TOKEN env var)")
return nil, errors.New("token is required (use --token or set GITHUB_TOKEN env var")
}

auth["Authorization"] = []string{fmt.Sprintf("token %s", token)}
Expand Down

0 comments on commit 39f4aa6

Please sign in to comment.