Skip to content

Commit

Permalink
feat(ci): fail if there are changed files
Browse files Browse the repository at this point in the history
  • Loading branch information
antosdaniel committed Nov 4, 2023
1 parent 0ebce44 commit 60264db
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Gen

on: [push]

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

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

- name: Install tools
run: make install

- name: Generate code
run: make generate

- name: Fail if there are changed files
run: if [ -n "$(git diff --name-only)" ]; then exit 1; fi
2 changes: 2 additions & 0 deletions internal/db/models/payslips.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions internal/grpc/payrollService.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
)

//go:generate mockgen -source payrollService.go -destination mocks/mocks.go -package mocks

//go:generate gowrap gen -g -p ../../gen/grpc/payroll/payrollv1/payrollv1connect -i PayrollServiceHandler -t ./../../templates/log -o payrollServiceWithLogs.go

type payrollServiceServer struct {
Expand Down

0 comments on commit 60264db

Please sign in to comment.