From ad3bd61039e069bec2a4cecc32e597b52feeb025 Mon Sep 17 00:00:00 2001 From: Go Takagi <15936908+shimastripe@users.noreply.github.com> Date: Sun, 14 Nov 2021 15:10:05 +0900 Subject: [PATCH 1/7] Fix test input --- apig/generate_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apig/generate_test.go b/apig/generate_test.go index 6ed2f58..0029f29 100644 --- a/apig/generate_test.go +++ b/apig/generate_test.go @@ -46,7 +46,7 @@ var userModel = &Model{ var detail = &Detail{ VCS: "github.com", - User: "wantedly", + User: "shimastripe", Project: "api-server", Model: userModel, Models: []*Model{userModel}, From 153f6708d50ed30239d0b546c66106c0bb139146 Mon Sep 17 00:00:00 2001 From: Go Takagi <15936908+shimastripe@users.noreply.github.com> Date: Sun, 14 Nov 2021 15:04:04 +0900 Subject: [PATCH 2/7] Create test.yml --- .github/workflows/test.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..0b9de21 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: Test + +on: push + +jobs: + + build: + strategy: + matrix: + go-version: [1.16.x, 1.17.x] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Deps + run: | + make deps + - name: Test + run: | + make test + - name: Generation Test + run: | + make generation-test From 31fdba5f8fa8da7b296bb2071488b1c4ff5a5a3d Mon Sep 17 00:00:00 2001 From: Go Takagi <15936908+shimastripe@users.noreply.github.com> Date: Sun, 14 Nov 2021 15:20:04 +0900 Subject: [PATCH 3/7] Fix go mod init option --- script/generation_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/generation_test.sh b/script/generation_test.sh index 5ea7de5..fb914b3 100755 --- a/script/generation_test.sh +++ b/script/generation_test.sh @@ -13,7 +13,7 @@ if [[ ! $(git status . | grep 'nothing to commit') ]]; then fi echo "===> Building API server..." -go mod init +go mod init github.com/shimastripe/apig/_example go mod tidy go build From c8907178cf1e9ff4f7f96f8f0720ddd0a3b9a3b7 Mon Sep 17 00:00:00 2001 From: Go Takagi <15936908+shimastripe@users.noreply.github.com> Date: Sat, 13 Nov 2021 16:45:32 +0900 Subject: [PATCH 4/7] Bump required go version up 1.16 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f64842..eba223e 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ apig is an RESTful API server generator. ## How to build and install -Go 1.6 or higher is required. +Go 1.16 or higher is required. After installing required version of Go, you can build and install `apig` by From 4620ef3439f5c8ca3bc574424d3f6d4c144380d8 Mon Sep 17 00:00:00 2001 From: Go Takagi <15936908+shimastripe@users.noreply.github.com> Date: Sat, 13 Nov 2021 17:01:09 +0900 Subject: [PATCH 5/7] Remove travis ci config --- .travis.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 953d738..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: go -go: - - '1.6' - - '1.7' -env: - - GO15VENDOREXPERIMENT=1 -install: - - make deps -script: - - make test - - make generation-test From d67f2f7bddd9d65e4103b6d21a011388cfeada35 Mon Sep 17 00:00:00 2001 From: Go Takagi <15936908+shimastripe@users.noreply.github.com> Date: Sun, 14 Nov 2021 15:25:55 +0900 Subject: [PATCH 6/7] Add build test --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1131836 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build + +on: push + +jobs: + + build: + strategy: + matrix: + go-version: [1.16.x, 1.17.x] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Deps + run: | + make deps + - name: Build Test + run: | + make install From 1f2e0a95db867e7dfab916a3cdabd9f76503f237 Mon Sep 17 00:00:00 2001 From: Go Takagi <15936908+shimastripe@users.noreply.github.com> Date: Sun, 14 Nov 2021 15:28:47 +0900 Subject: [PATCH 7/7] Add CI status badge --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eba223e..5e9e98c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # apig: Golang RESTful API Server Generator -[![Build Status](https://travis-ci.org/wantedly/apig.svg?branch=master)](https://travis-ci.org/wantedly/apig) +[![Build](https://github.com/shimastripe/apig/actions/workflows/build.yml/badge.svg)](https://github.com/shimastripe/apig/actions/workflows/build.yml) +[![Test](https://github.com/shimastripe/apig/actions/workflows/test.yml/badge.svg)](https://github.com/shimastripe/apig/actions/workflows/test.yml) apig is an RESTful API server generator. @@ -53,7 +54,7 @@ First, creating by `apig new` command. $ apig new -u shimastripe apig-sample ``` -generates Golang API server boilerplate under `$GOPATH/src/gihhub.com/wantedly/apig-sample`. +generates Golang API server boilerplate under `$GOPATH/src/github.com/shimastripe/apig-sample`. apig supports two database engines; SQLite (`sqlite`) and PostgreSQL (`postgres`) and Mysql (`mysql`). You can specify this by `-d, -database` option. Available command line options of `apig new` command are: