Skip to content

Commit

Permalink
add a seperate lint and test action for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
soapiestwaffles committed May 16, 2024
1 parent 5c034cd commit 519129a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 8 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Lint & Test PR"
on:
pull_request:
branches:
- master
- main
types:
- opened
- synchronize
- reopened
- ready_for_review
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
golangci-lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
golangci-test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up golang
uses: actions/setup-go@v2
with:
go-version: 1.22
- name: golangci-test
run: go test ./... -coverprofile=profile.cov -cover
8 changes: 0 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ on:
- master
- main
pull_request:
branches:
- master
- main
types:
- opened
- synchronize
- reopened
- ready_for_review
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
Expand Down

0 comments on commit 519129a

Please sign in to comment.