Skip to content

Commit

Permalink
feat: Use goravel console command (#2)
Browse files Browse the repository at this point in the history
* use goravel console in installer

* add flags to new command

* add support to nested directory

* add support to nested directory

* add generate method

* optimize readme

* add version

* remove unnecessary files

* update go.mod

* add test case for `NewCommand`

* add .github folder

* use master branch of framework

* Optimize style

* Remove code

* use spinner

* add spinner test

* remove local replace of framework

* Update console/commands/new_command.go

* Update console/commands/new_command.go

---------

Co-authored-by: Wenbo han <wenbo.han@compass.com>
  • Loading branch information
kkumar-gcc and hwbrzzl authored May 28, 2024
1 parent b408c12 commit 815ebeb
Show file tree
Hide file tree
Showing 15 changed files with 525 additions and 211 deletions.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Please submit to goravel/goravel (请提交至 goravel/goravel)
url: https://github.com/goravel/goravel/issues/new/choose
about: Thanks in advance for your feedback (提前感谢您的反馈)
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: gomod
directory: /
labels:
- "🤖 Dependencies"
schedule:
interval: daily
groups:
go-modules:
patterns:
- "*"
open-pull-requests-limit: 100
- package-ecosystem: github-actions
directory: /
labels:
- "🤖 Dependencies"
schedule:
interval: daily
groups:
github-actions:
patterns:
- "*"
open-pull-requests-limit: 100
25 changes: 25 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Codecov
on:
push:
branches:
- master
pull_request:
jobs:
codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Install dependencies
run: go mod tidy
- name: Run tests with coverage
run: go test -coverprofile="coverage.out" $(go list ./... | grep -v /mocks | grep -v /facades | grep -v /contracts | grep -v /testing/mock)
- name: Print coverage report
run: go tool cover -func=coverage.out
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.out
token: ${{ secrets.CODECOV }}
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint
on:
push:
branches:
- master
pull_request:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: false
- name: go mod pakcage cache
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.mod') }}
- name: Install dependencies
run: go mod tidy
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
skip-cache: true
skip-pkg-cache: true
skip-build-cache: true
version: latest
args: --timeout=30m ./...
11 changes: 11 additions & 0 deletions .github/workflows/pr-title-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: PR Check Title
on:
pull_request:
jobs:
pr-check-title:
runs-on: ubuntu-latest
steps:
- uses: Slashgear/action-check-pr-title@v4.3.0
with:
regexp: "^(feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|types|wip|release|revert)(\\(.+\\))?!?: .+"
helpMessage: "Your PR title is invalid. Please follow the Conventional Commits specification: https://www.conventionalcommits.org/en/v1.0.0/"
47 changes: 47 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Test
on:
push:
branches:
- master
pull_request:
jobs:
test:
strategy:
matrix:
go:
- "1.21"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: go mod pakcage cache
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('go.mod') }}
- name: Install dependencies
run: go mod tidy
- name: Run tests
run: go test ./...
windows:
strategy:
matrix:
go:
- "1.21"
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: go mod pakcage cache
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('go.mod') }}
- name: Install dependencies
run: go mod tidy
- name: Run tests
run: go test ./...
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
# installer
# Goravel Installer

[![Doc](https://pkg.go.dev/badge/github.com/goravel/installer)](https://pkg.go.dev/github.com/goravel/installer)
[![Go](https://img.shields.io/github/go-mod/go-version/goravel/installer)](https://go.dev/)
[![Release](https://img.shields.io/github/release/goravel/installer.svg)](https://github.com/goravel/installer/releases)
[![Test](https://github.com/goravel/installer/actions/workflows/test.yml/badge.svg)](https://github.com/goravel/installer/actions)
[![Report Card](https://goreportcard.com/badge/github.com/goravel/installer)](https://goreportcard.com/report/github.com/goravel/installer)
[![Codecov](https://codecov.io/gh/goravel/gin/branch/master/graph/badge.svg)](https://codecogin/v.io/gh/goravel/installer)
![License](https://img.shields.io/github/license/goravel/installer)

Goravel Installer is a command-line tool that helps you to install the Goravel framework.

## Version

| goravel/installer | goravel/framework |
|-------------------|-------------------|
| v1.1.x | v1.13.x |

## Installation

```bash
go install -u github.com/goravel/installer
```

## Usage

```bash
goravel new blog
```

## License

Goravel Installer is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).
165 changes: 0 additions & 165 deletions cmd/main.go

This file was deleted.

Loading

0 comments on commit 815ebeb

Please sign in to comment.