mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	Add deepsource code coverage (#5717)
* added deepsource coverage settings * Ignore missing coverage * trigger full CI run * only run when upstream, master and push
This commit is contained in:
		
							
								
								
									
										9
									
								
								.github/workflows/qc_checks.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								.github/workflows/qc_checks.yaml
									
									
									
									
										vendored
									
									
								
							@@ -195,6 +195,7 @@ jobs:
 | 
			
		||||
      INVENTREE_DB_ENGINE: sqlite3
 | 
			
		||||
      INVENTREE_PLUGINS_ENABLED: true
 | 
			
		||||
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
			
		||||
      DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1
 | 
			
		||||
@@ -216,6 +217,14 @@ jobs:
 | 
			
		||||
        uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 # pin@v2.2.3
 | 
			
		||||
        with:
 | 
			
		||||
          github-token: ${{ secrets.GITHUB_TOKEN }}
 | 
			
		||||
      - name: Upload Coverage to Deepsource
 | 
			
		||||
        if:  ${{ github.repository == 'inventree/InvenTree' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
 | 
			
		||||
        env:
 | 
			
		||||
          DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
 | 
			
		||||
        run: |
 | 
			
		||||
          coverage xml -i
 | 
			
		||||
          curl -sSL https://deepsource.io/cli | sh
 | 
			
		||||
          ./bin/deepsource report --analyzer test-coverage --key python --value-file coverage.xml
 | 
			
		||||
 | 
			
		||||
  postgres:
 | 
			
		||||
    name: Tests - DB [PostgreSQL]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user