go generateに対応させた #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate mocks | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
go install go.uber.org/mock/mockgen@latest | |
- name: Generate mocks | |
run: | | |
for dir in "/app/application/middlewares" "/app/application/services" "/app/interface/handlers"; do | |
for file in $(find $dir -name '*.go' ! -name '*_interface.go'); do | |
mockgen -source=$file -destination=mocks/ | |
done | |
done |