Skip to content

Commit

Permalink
[actions] refresh lint and test action
Browse files Browse the repository at this point in the history
  • Loading branch information
capcom6 committed Jan 31, 2025
1 parent b886db3 commit 636a33d
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions .github/workflows/lint-test.yml → .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
name: Lint and Test
name: Go

on:
workflow_dispatch:
push:
branches: [master]
paths:
- "**.go"
- "go.mod"
- "go.sum"
pull_request:

permissions:
contents: read
branches: [master]
paths:
- "**.go"
- "go.mod"
- "go.sum"

jobs:
golangci:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
# step 1: checkout repository code
- name: Checkout code into workspace directory
uses: actions/checkout@v4

# step 2: set up go
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: golangci-lint

# step 3: run golangci-lint
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
Expand All @@ -41,3 +58,9 @@ jobs:
# step 4: run test
- name: Run coverage
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...

# step 5: upload coverage
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 636a33d

Please sign in to comment.