From 4b8baf142c6cb53fcf9c580f9a834cb6b5c9b7b2 Mon Sep 17 00:00:00 2001 From: mimatache Date: Thu, 9 Nov 2023 23:56:19 +0200 Subject: [PATCH] ci: linting on generated code resolve #39 --- .github/workflows/generate-linter.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/generate-linter.yml diff --git a/.github/workflows/generate-linter.yml b/.github/workflows/generate-linter.yml new file mode 100644 index 00000000..833636e3 --- /dev/null +++ b/.github/workflows/generate-linter.yml @@ -0,0 +1,26 @@ +name: Linting Generated Blueprints + +on: + pull_request: {} + +jobs: + framework_matrix: + strategy: + matrix: + framework: [chi, gin, fiber, gorilla/mux, httprouter, standard-library, echo] + goVersion: [1.20] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: 1.20 + - name: build templates + run: go run main.go create -n ${{ matrix.framework }} -f ${{ matrix.framework}} + + - name: golangci-lint + working-directory: ${{ matrix.framework }} + run: | + go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2 + golangci-lint run --timeout 5m