mirror of
				https://github.com/haraldh/chainerror.git
				synced 2025-10-28 05:34:08 +01:00 
			
		
		
		
	Revised the GitHub Actions workflow for code coverage by updating dependencies, using modern, maintained actions, and improving configuration clarity. Streamlined Rust installation and replaced manual steps with dedicated actions for better reliability. Adjusted Codecov settings for stricter error handling. Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
		
			
				
	
	
		
			36 lines
		
	
	
	
		
			905 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
	
		
			905 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: coverage
 | |
| 
 | |
| on:
 | |
|   # Trigger the workflow on push or pull request,
 | |
|   # but only for the master branch
 | |
|   push:
 | |
|     branches:
 | |
|       - master
 | |
|   pull_request:
 | |
|     branches:
 | |
|       - master
 | |
|   release:
 | |
|     types:
 | |
|       - created
 | |
| 
 | |
| 
 | |
| jobs:
 | |
|   coverage:
 | |
|     runs-on: ubuntu-latest
 | |
|     env:
 | |
|       CARGO_TERM_COLOR: always
 | |
|     steps:
 | |
|       - uses: actions/checkout@v4
 | |
|       - name: Install Rust
 | |
|         run: |
 | |
|           rustup update nightly
 | |
|       - name: Install cargo-llvm-cov
 | |
|         uses: taiki-e/install-action@cargo-llvm-cov
 | |
|       - name: Generate code coverage
 | |
|         run: cargo +nightly llvm-cov --all-features --workspace --codecov --doctests --output-path codecov.json
 | |
|       - name: Upload coverage to Codecov
 | |
|         uses: codecov/codecov-action@v3
 | |
|         with:
 | |
|           token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
 | |
|           files: codecov.json
 | |
|           fail_ci_if_error: true
 |