All checks were successful
		
		
	
	sync / sync (push) Successful in 35s
				
			Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
		
			
				
	
	
		
			54 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: coverage
 | |
| 
 | |
| on:
 | |
|   push:
 | |
|     branches: [ main, v3, v4 ]
 | |
|     paths-ignore:
 | |
|       - '.github/**'
 | |
|       - '.gitea/**'
 | |
|   pull_request:
 | |
|     branches: [ main, v3, v4 ]
 | |
| 
 | |
| jobs:
 | |
| 
 | |
|   build:
 | |
|     if: github.server_url != 'https://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 }}
 |