mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	reorganize test CI, only upload coveralls once
This commit is contained in:
		
							
								
								
									
										73
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										73
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -6,31 +6,40 @@ jobs: | ||||
|   documentation: | ||||
|     runs-on: ubuntu-20.04 | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|       - name: Set up Python | ||||
|       - | ||||
|         name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - | ||||
|         name: Set up Python | ||||
|         uses: actions/setup-python@v2 | ||||
|         with: | ||||
|           python-version: 3.8 | ||||
|       - name: Get pip cache dir | ||||
|       - | ||||
|         name: Get pip cache dir | ||||
|         id: pip-cache | ||||
|         run: | | ||||
|           echo "::set-output name=dir::$(pip cache dir)" | ||||
|       - name: Persistent Github pip cache | ||||
|       - | ||||
|         name: Persistent Github pip cache | ||||
|         uses: actions/cache@v2 | ||||
|         with: | ||||
|           path: ${{ steps.pip-cache.outputs.dir }} | ||||
|           key: ${{ runner.os }}-pip3.8} | ||||
|       - name: Install dependencies | ||||
|       - | ||||
|         name: Install dependencies | ||||
|         run: | | ||||
|           sudo apt-get update -qq | ||||
|           sudo apt-get install -qq --no-install-recommends libpoppler-cpp-dev | ||||
|           pip install --upgrade pipenv | ||||
|           pipenv install --system --dev --ignore-pipfile | ||||
|       - name: Make documentation | ||||
|       - | ||||
|         name: Make documentation | ||||
|         run: | | ||||
|           cd docs/ | ||||
|           make html | ||||
|       - uses: actions/upload-artifact@v2 | ||||
|       - | ||||
|         name: Upload artifact | ||||
|         uses: actions/upload-artifact@v2 | ||||
|         with: | ||||
|           name: documentation | ||||
|           path: docs/_build/html/ | ||||
| @@ -41,44 +50,67 @@ jobs: | ||||
|       matrix: | ||||
|         python-version: ['3.6', '3.7', '3.8'] | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|       - name: Set up Python | ||||
|       - | ||||
|         name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - | ||||
|         name: Set up Python | ||||
|         uses: actions/setup-python@v2 | ||||
|         with: | ||||
|           python-version: "${{ matrix.python-version }}" | ||||
|       - name: Get pip cache dir | ||||
|       - | ||||
|         name: Get pip cache dir | ||||
|         id: pip-cache | ||||
|         run: | | ||||
|           echo "::set-output name=dir::$(pip cache dir)" | ||||
|       - name: Persistent Github pip cache | ||||
|       - | ||||
|         name: Persistent Github pip cache | ||||
|         uses: actions/cache@v2 | ||||
|         with: | ||||
|           path: ${{ steps.pip-cache.outputs.dir }} | ||||
|           key: ${{ runner.os }}-pip${{ matrix.python }} | ||||
|       - name: Tests | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
|         # https://github.com/coveralls-clients/coveralls-python/issues/251 | ||||
|           key: ${{ runner.os }}-pip${{ matrix.python-version }} | ||||
|       - | ||||
|         name: Prepare tests | ||||
|         run: | | ||||
|           sudo apt-get update -qq | ||||
|           sudo apt-get install -qq --no-install-recommends libpoppler-cpp-dev unpaper tesseract-ocr imagemagick ghostscript optipng | ||||
|           pip install --upgrade pipenv | ||||
|           pipenv install --system --dev --ignore-pipfile | ||||
|       - | ||||
|         name: Tests | ||||
|         run: | | ||||
|           cd src/ | ||||
|           pytest | ||||
|       - | ||||
|         name: Codestyle | ||||
|         run: | | ||||
|           cd src/ | ||||
|           pycodestyle | ||||
|       - | ||||
|         name: Publish coverage results | ||||
|         if: matrix.python-version == '3.8' | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
|         # https://github.com/coveralls-clients/coveralls-python/issues/251 | ||||
|         run: | | ||||
|           cd src/ | ||||
|           coveralls --service=github | ||||
|  | ||||
|   frontend: | ||||
|     runs-on: ubuntu-20.04 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v2 | ||||
|     - uses: actions/setup-node@v2 | ||||
|     - | ||||
|       name: Checkout | ||||
|       uses: actions/checkout@v2 | ||||
|     - | ||||
|       uses: actions/setup-node@v2 | ||||
|       with: | ||||
|         node-version: '15' | ||||
|     - name: Build frontend | ||||
|     - | ||||
|       name: Build frontend | ||||
|       run: ./compile-frontend.sh | ||||
|     - name: Upload artifact | ||||
|     - | ||||
|       name: Upload artifact | ||||
|       uses: actions/upload-artifact@v2 | ||||
|       with: | ||||
|         name: frontend-compiled | ||||
| @@ -89,6 +121,7 @@ jobs: | ||||
|     runs-on: ubuntu-20.04 | ||||
|     steps: | ||||
|       - | ||||
|         name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - | ||||
|         name: Set up Python | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler