-
-
Notifications
You must be signed in to change notification settings - Fork 478
Cli refactor #376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Cli refactor #376
Changes from 29 commits
8b08583
1801009
3364611
8565824
545a1a6
4a4075a
698e34b
e4b2943
5845750
84ef692
2f967a8
1ce2141
aecc318
401c3e6
c1286fd
15713b1
a6c576f
7053241
0610810
60e59c4
229347d
a505d9d
eefab6b
4605f5d
8661942
32dbf5d
c401be2
7f17dcd
1396b0f
874853c
1d09645
d28c3b0
5bc3105
e5b978a
5a8ab70
096972a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,13 +5,13 @@ on: | |
| workflow_dispatch: {} | ||
|
|
||
| jobs: | ||
| framework_matrix: | ||
| blueprint_matrix: | ||
| strategy: | ||
| matrix: | ||
| framework: [chi, gin, fiber, gorilla/mux, httprouter, standard-library, echo] | ||
| backend: [chi, gin, fiber, gorilla/mux, httprouter, standard-library, echo] | ||
| driver: [postgres] | ||
| git: [commit] | ||
| advanced: [htmx, githubaction, websocket, tailwind, docker, react] | ||
Ujstor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| advanced: [githubaction, websocket, docker] | ||
|
|
||
| runs-on: ubuntu-latest | ||
| steps: | ||
|
|
@@ -30,18 +30,12 @@ jobs: | |
| 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: Set dir variable | ||
| id: set-project-directory | ||
| run: echo "PROJECT_DIRECTORY=${{ matrix.backend }}" | 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 }}" | ||
|
|
||
| - 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 }} | ||
| run: script -q /dev/null -c "go run main.go create -n ${{ env.PROJECT_DIRECTORY }} -b ${{ matrix.backend}} -d ${{ matrix.driver }} -g ${{ matrix.git}} -a --feature ${{ matrix.advanced }}" | ||
|
|
||
| - name: golangci-lint | ||
| run: | | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,10 +5,10 @@ on: | |
| workflow_dispatch: {} | ||
|
|
||
| jobs: | ||
| framework_matrix: | ||
| blueprint_matrix: | ||
| strategy: | ||
| matrix: | ||
| framework: [chi, gin, fiber, gorilla/mux, httprouter, standard-library, echo] | ||
| backend: [chi, gin, fiber, gorilla/mux, httprouter, standard-library, echo] | ||
Ujstor marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| driver: [mysql, postgres, sqlite, mongo, redis, scylla, none] | ||
| git: [commit, stage, skip] | ||
|
|
||
|
|
@@ -29,12 +29,12 @@ jobs: | |
| 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: Set dir variable | ||
| id: set-project-directory | ||
| run: echo "PROJECT_DIRECTORY=${{ matrix.backend }}" | 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}}" | ||
| run: script -q /dev/null -c "go run main.go create -n ${{ env.PROJECT_DIRECTORY }} -b ${{ matrix.backend}} -d ${{ matrix.driver }} -g ${{ matrix.git}}" | ||
|
|
||
| - name: golangci-lint | ||
| run: | | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: Linting Generated Blueprints Advanced | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does the frontend linter need to know the backend matrix?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Backend framework, DB drivers and Git are required inputs for project creation. And we are looping over all backends to ensure we don't have templating issues on any of them when they are paired with frontend. |
||
|
|
||
| on: | ||
| pull_request: {} | ||
| workflow_dispatch: {} | ||
|
|
||
| jobs: | ||
| blueprint_matrix: | ||
| strategy: | ||
| matrix: | ||
| backend: [chi, gin, fiber, gorilla/mux, httprouter, standard-library, echo] | ||
Ujstor marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| driver: [postgres] | ||
| git: [commit] | ||
| advanced: [docker] | ||
| frontendFramework: [htmx, react] | ||
| frontendAdvanced: [tailwind] | ||
|
|
||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.23.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 dir variable | ||
| id: set-project-directory | ||
| run: echo "PROJECT_DIRECTORY=${{ matrix.backend }}" | sed 's/\//-/g' >> $GITHUB_ENV | ||
|
|
||
| - name: build templates | ||
| run: script -q /dev/null -c "go run main.go create -n ${{ env.PROJECT_DIRECTORY }} -b ${{ matrix.backend}} -d ${{ matrix.driver }} -g ${{ matrix.git}} -a --feature ${{ matrix.advanced }} -f ${{ matrix.frontendFramework }} --frontend-advanced ${{ matrix.frontendAdvanced}}" | ||
|
|
||
| - if: ${{ matrix.frontendFramework == 'htmx'}} | ||
| 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 }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,9 @@ | ||
| go-blueprint | ||
| main | ||
|
|
||
| site | ||
|
|
||
| *templ.go | ||
| output.css | ||
| tailwindcss | ||
| tmp/ |
Uh oh!
There was an error while loading. Please reload this page.