Skip to content

Commit

Permalink
Merge pull request #487 from wata727/tools_check_in_ci
Browse files Browse the repository at this point in the history
Test tools in GitHub Actions
  • Loading branch information
wata727 committed Oct 12, 2019
2 parents dc707ce + 37255b5 commit 4f2cf62
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/generated_code_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: generated-code

on: pull_request

jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: make code
run: |
export PATH=$PATH:$(go env GOPATH)/bin
make tools code && git diff --exit-code
- name: go run ./rule-gen
working-directory: ./tools
run: echo test | go run ./rule-gen
- name: go run ./api-rule-gen
working-directory: ./tools
run: go run ./api-rule-gen && git diff --exit-code
- name: go run ./model-rule-gen
working-directory: ./tools
run: go run ./model-rule-gen && git diff --exit-code
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: release

on:
push:
Expand All @@ -8,15 +8,15 @@ on:
- v*.*.*

jobs:
release:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up Go
uses: actions/setup-go@v1
with:
version: 1.13
go-version: 1.13
- name: Run GoReleaser
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion tflint/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/spf13/afero"
)

//go:generate mockgen -source loader.go -destination loader_mock.go -package tflint
//go:generate mockgen -source loader.go -destination loader_mock.go -package tflint -self_package github.com/wata727/tflint/tflint

// AbstractLoader is a loader interface for mock
type AbstractLoader interface {
Expand Down

0 comments on commit 4f2cf62

Please sign in to comment.