53
									
								
								.github/workflows/job_coverage.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								.github/workflows/job_coverage.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,53 @@ | |||||||
|  | name: coverage | ||||||
|  |  | ||||||
|  | on: | ||||||
|  |   push: | ||||||
|  |     branches: [ main, v3, v4 ] | ||||||
|  |     paths-ignore: | ||||||
|  |       - '.github/**' | ||||||
|  |       - '.gitea/**' | ||||||
|  |   pull_request: | ||||||
|  |     branches: [ main, v3, v4 ] | ||||||
|  |  | ||||||
|  | jobs: | ||||||
|  |  | ||||||
|  |   build: | ||||||
|  |     if: github.server_url == 'zhttps://github.com' | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     steps: | ||||||
|  |     - name: checkout code | ||||||
|  |       uses: actions/checkout@v4 | ||||||
|  |       with: | ||||||
|  |         filter: 'blob:none' | ||||||
|  |  | ||||||
|  |     - name: setup go | ||||||
|  |       uses: actions/setup-go@v5 | ||||||
|  |       with: | ||||||
|  |         cache-dependency-path: "**/*.sum" | ||||||
|  |         go-version: 'stable' | ||||||
|  |  | ||||||
|  |     - name: test coverage | ||||||
|  |       run: | | ||||||
|  |         go test -v -cover ./... -covermode=count -coverprofile coverage.out -coverpkg ./... | ||||||
|  |         go tool cover -func coverage.out -o coverage.out | ||||||
|  |  | ||||||
|  |     - name: coverage badge | ||||||
|  |       uses: tj-actions/coverage-badge-go@v2 | ||||||
|  |       with: | ||||||
|  |         green: 80 | ||||||
|  |         filename: coverage.out | ||||||
|  |  | ||||||
|  |     - uses: stefanzweifel/git-auto-commit-action@v4 | ||||||
|  |       name: autocommit | ||||||
|  |       with: | ||||||
|  |         commit_message: Apply Code Coverage Badge | ||||||
|  |         skip_fetch: false | ||||||
|  |         skip_checkout: false | ||||||
|  |         file_pattern: ./README.md | ||||||
|  |  | ||||||
|  |     - name: push | ||||||
|  |       if: steps.auto-commit-action.outputs.changes_detected == 'true' | ||||||
|  |       uses: ad-m/github-push-action@master | ||||||
|  |       with: | ||||||
|  |         github_token: ${{ github.token }} | ||||||
|  |         branch: ${{ github.ref }} | ||||||
							
								
								
									
										38
									
								
								.github/workflows/job_lint.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										38
									
								
								.github/workflows/job_lint.yml
									
									
									
									
										vendored
									
									
								
							| @@ -3,27 +3,27 @@ name: lint | |||||||
| on: | on: | ||||||
|   pull_request: |   pull_request: | ||||||
|     types: [opened, reopened, synchronize] |     types: [opened, reopened, synchronize] | ||||||
|     branches: |     branches: [ master, v3, v4 ] | ||||||
|       - master |     paths-ignore: | ||||||
|       - v3 |       - '.github/**' | ||||||
|       - v4 |       - '.gitea/**' | ||||||
|  |  | ||||||
| jobs: | jobs: | ||||||
|   lint: |   lint: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
|       - name: checkout code |     - name: checkout code | ||||||
|         uses: actions/checkout@v4 |       uses: actions/checkout@v4 | ||||||
|         with: |       with: | ||||||
|           filter: 'blob:none' |         filter: 'blob:none' | ||||||
|       - name: setup go |     - name: setup go | ||||||
|         uses: actions/setup-go@v5 |       uses: actions/setup-go@v5 | ||||||
|         with: |       with: | ||||||
|           cache-dependency-path: "**/*.sum" |         cache-dependency-path: "**/*.sum" | ||||||
|           go-version: 'stable' |         go-version: 'stable' | ||||||
|       - name: setup deps |     - name: setup deps | ||||||
|         run: go get -v ./... |       run: go get -v ./... | ||||||
|       - name: run lint |     - name: run lint | ||||||
|         uses: golangci/golangci-lint-action@v6 |       uses: golangci/golangci-lint-action@v6 | ||||||
|         with: |       with: | ||||||
|           version: 'latest' |         version: 'latest' | ||||||
|   | |||||||
							
								
								
									
										13
									
								
								.github/workflows/job_test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								.github/workflows/job_test.yml
									
									
									
									
										vendored
									
									
								
							| @@ -3,15 +3,12 @@ name: test | |||||||
| on: | on: | ||||||
|   pull_request: |   pull_request: | ||||||
|     types: [opened, reopened, synchronize] |     types: [opened, reopened, synchronize] | ||||||
|     branches: |     branches: [ master, v3, v4 ] | ||||||
|     - master |  | ||||||
|     - v3 |  | ||||||
|     - v4 |  | ||||||
|   push: |   push: | ||||||
|     branches: |     branches: [ master, v3, v4 ] | ||||||
|     - master |     paths-ignore: | ||||||
|     - v3 |       - '.github/**' | ||||||
|     - v4 |       - '.gitea/**' | ||||||
|  |  | ||||||
| jobs: | jobs: | ||||||
|   test: |   test: | ||||||
|   | |||||||
							
								
								
									
										81
									
								
								.github/workflows/job_tests.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										81
									
								
								.github/workflows/job_tests.yml
									
									
									
									
										vendored
									
									
								
							| @@ -3,51 +3,48 @@ name: test | |||||||
| on: | on: | ||||||
|   pull_request: |   pull_request: | ||||||
|     types: [opened, reopened, synchronize] |     types: [opened, reopened, synchronize] | ||||||
|     branches: |     branches: [ master, v3, v4 ] | ||||||
|       - master |  | ||||||
|       - v3 |  | ||||||
|       - v4 |  | ||||||
|   push: |   push: | ||||||
|     branches: |     branches: [ master, v3, v4 ] | ||||||
|       - master |     paths-ignore: | ||||||
|       - v3 |       - '.github/**' | ||||||
|       - v4 |       - '.gitea/**' | ||||||
|  |  | ||||||
| jobs: | jobs: | ||||||
|   test: |   test: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
|       - name: checkout code |     - name: checkout code | ||||||
|         uses: actions/checkout@v4 |       uses: actions/checkout@v4 | ||||||
|         with: |       with: | ||||||
|           filter: 'blob:none' |         filter: 'blob:none' | ||||||
|       - name: checkout tests |     - name: checkout tests | ||||||
|         uses: actions/checkout@v4 |       uses: actions/checkout@v4 | ||||||
|         with: |       with: | ||||||
|           ref: master |         ref: master | ||||||
|           filter: 'blob:none' |         filter: 'blob:none' | ||||||
|           repository: unistack-org/micro-tests |         repository: unistack-org/micro-tests | ||||||
|           path: micro-tests |         path: micro-tests | ||||||
|       - name: setup go |     - name: setup go | ||||||
|         uses: actions/setup-go@v5 |       uses: actions/setup-go@v5 | ||||||
|         with: |       with: | ||||||
|           cache-dependency-path: "**/*.sum" |         cache-dependency-path: "**/*.sum" | ||||||
|           go-version: 'stable' |         go-version: 'stable' | ||||||
|       - name: setup go work |     - name: setup go work | ||||||
|         env: |       env: | ||||||
|           GOWORK: ${{ github.workspace }}/go.work |         GOWORK: ${{ github.workspace }}/go.work | ||||||
|         run: | |       run: | | ||||||
|           go work init |         go work init | ||||||
|           go work use . |         go work use . | ||||||
|           go work use micro-tests |         go work use micro-tests | ||||||
|       - name: setup deps |     - name: setup deps | ||||||
|         env: |       env: | ||||||
|           GOWORK: ${{ github.workspace }}/go.work |         GOWORK: ${{ github.workspace }}/go.work | ||||||
|         run: go get -v ./... |       run: go get -v ./... | ||||||
|       - name: run tests |     - name: run tests | ||||||
|         env: |       env: | ||||||
|           INTEGRATION_TESTS: yes |         INTEGRATION_TESTS: yes | ||||||
|           GOWORK: ${{ github.workspace }}/go.work |         GOWORK: ${{ github.workspace }}/go.work | ||||||
|         run: | |       run: | | ||||||
|           cd micro-tests |         cd micro-tests | ||||||
|           go test -mod readonly -v ./... || true |         go test -mod readonly -v ./... || true | ||||||
|   | |||||||
| @@ -1,4 +1,5 @@ | |||||||
| # HTTP Server | # HTTP Server | ||||||
|  |  | ||||||
|  |  | ||||||
| The HTTP Server is a go-micro.Server. It's a partial implementation which strips out codecs, transports, etc but enables you  | The HTTP Server is a go-micro.Server. It's a partial implementation which strips out codecs, transports, etc but enables you  | ||||||
| to create a HTTP Server that could potentially be used for REST based API services. | to create a HTTP Server that could potentially be used for REST based API services. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user