Skip to content

Commit

Permalink
Linter added
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaysoro committed Nov 15, 2024
1 parent 6e09303 commit f9ad2dd
Show file tree
Hide file tree
Showing 9 changed files with 379 additions and 75 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Golangci-lint
on:
push:
branches:
- main
- master
pull_request:

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22.0'

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
31 changes: 0 additions & 31 deletions .github/workflows/goreleaser.yml

This file was deleted.

17 changes: 7 additions & 10 deletions .github/workflows/build.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
name: Build
name: Test

on:
push:
branches:
- main
- master
pull_request:

jobs:
build:
name: Build and Test
name: test
runs-on: ubuntu-latest

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

- name: Set up Go
uses: actions/setup-go@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22.0'

- name: Run Tests
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.txt
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
Loading

0 comments on commit f9ad2dd

Please sign in to comment.