Skip to content

Commit

Permalink
Merge pull request #7 from thought-machine/test-premerge
Browse files Browse the repository at this point in the history
Add premerge action
  • Loading branch information
Nashluffy authored Dec 21, 2023
2 parents 2dfdf3d + 6cc104e commit 1c525f4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint

on:
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

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

- name: Download mockery
run: go install github.com/vektra/mockery/[email protected]

- name: Generate
run: go generate -v ./...

- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.54
11 changes: 7 additions & 4 deletions .github/workflows/premerge.yaml → .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit tests, lint, and build
name: Unit tests

on:
pull_request:
Expand All @@ -18,8 +18,11 @@ jobs:
- name: Build
run: go build -v ./...

- name: Download mockery
run: go install github.com/vektra/mockery/[email protected]

- name: Generate
run: go generate -v ./...

- name: Test
run: go test -v ./...

- name: Lint
run: pre-commit run --all-files

0 comments on commit 1c525f4

Please sign in to comment.