-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (41 loc) · 1.66 KB
/
generate-linter-advanced.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Linting Generated ForgeXs Advanced
on:
pull_request: {}
workflow_dispatch: {}
jobs:
framework_matrix:
strategy:
matrix:
framework: [chi, gin, fiber, gorilla/mux, httprouter, standard-library, echo]
driver: [postgres]
git: [commit]
advanced: [htmx, githubaction, websocket, tailwind, docker]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.x'
- name: Install golangci-lint
run: go install github.com/golangci/golangci-lint/cmd/[email protected]
- name: Commit report
run: |
git config --global user.name 'testname'
git config --global user.email '[email protected]'
- name: Set framework variable
id: set-proejct-directory
run: echo "PROJECT_DIRECTORY=${{ matrix.framework }}" | sed 's/\//-/g' >> $GITHUB_ENV
- name: build templates
run: script -q /dev/null -c "go run main.go create -n ${{ env.PROJECT_DIRECTORY }} -f ${{ matrix.framework}} -d ${{ matrix.driver }} -g ${{ matrix.git}} --advanced --feature ${{ matrix.advanced }}" /dev/null
- if: ${{ matrix.advanced == 'htmx' || matrix.advanced == 'tailwind' }}
name: Install Templ & gen templates
run: |
go install github.com/a-h/templ/cmd/templ@latest
/home/runner/go/bin/templ generate -path ${{ env.PROJECT_DIRECTORY }}
- name: golangci-lint
run: |
cd ${{ env.PROJECT_DIRECTORY }}
golangci-lint run
- name: remove templates
run: rm -rf ${{ env.PROJECT_DIRECTORY }}