mirror of
				https://github.com/haraldh/chainerror.git
				synced 2025-11-04 00:08:09 +01:00 
			
		
		
		
	ci: use codecov for coverage
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
		
							parent
							
								
									bb5f372a92
								
							
						
					
					
						commit
						376e133836
					
				
					 1 changed files with 38 additions and 17 deletions
				
			
		
							
								
								
									
										49
									
								
								.github/workflows/coverage.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										49
									
								
								.github/workflows/coverage.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -1,22 +1,43 @@
 | 
				
			||||||
name: coverage
 | 
					name: coverage
 | 
				
			||||||
 | 
					
 | 
				
			||||||
on:                             [ "push" , "pull_request" ]
 | 
					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:
 | 
					jobs:
 | 
				
			||||||
  test:
 | 
					  test:
 | 
				
			||||||
    name: coverage
 | 
					    name: coverage
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    container:
 | 
					 | 
				
			||||||
      image:                    xd009642/tarpaulin
 | 
					 | 
				
			||||||
      options:                  --security-opt seccomp=unconfined
 | 
					 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name:                   Checkout repository
 | 
					      - uses: actions/checkout@v1
 | 
				
			||||||
        uses:                   actions/checkout@v2
 | 
					      - uses: dtolnay/rust-toolchain@master
 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name:                   Generate code coverage
 | 
					 | 
				
			||||||
        run: |
 | 
					 | 
				
			||||||
          cargo tarpaulin --verbose --workspace --timeout 120 --out Lcov --output-dir coverage
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name:                   Upload to coveralls
 | 
					 | 
				
			||||||
        uses: coverallsapp/github-action@master
 | 
					 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          github-token: ${{ secrets.GITHUB_TOKEN }}
 | 
					          target: x86_64-unknown-linux-gnu
 | 
				
			||||||
 | 
					          toolchain: nightly
 | 
				
			||||||
 | 
					          components: llvm-tools-preview
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Install cargo-llvm-cov
 | 
				
			||||||
 | 
					        run: >
 | 
				
			||||||
 | 
					          curl -LsSf 'https://github.com/taiki-e/cargo-llvm-cov/releases/download/v0.5.23/cargo-llvm-cov-x86_64-unknown-linux-musl.tar.gz'
 | 
				
			||||||
 | 
					          | tar xzf -
 | 
				
			||||||
 | 
					          && mv cargo-llvm-cov $HOME/.cargo/bin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Run cargo-llvm-cov
 | 
				
			||||||
 | 
					        run: cargo llvm-cov --doctests --all --all-features --lcov --output-path lcov.info
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Upload coverage to Codecov
 | 
				
			||||||
 | 
					        uses: codecov/codecov-action@v3
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          directory: ./
 | 
				
			||||||
 | 
					          fail_ci_if_error: false
 | 
				
			||||||
 | 
					          files: ./lcov.info
 | 
				
			||||||
 | 
					          verbose: true
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue