mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Separate github action into separete workflow files
This commit is contained in:
		| @@ -5,84 +5,6 @@ on: | ||||
|     branches: travis-multiarch-builds | ||||
| 
 | ||||
| jobs: | ||||
|   tests: | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       matrix: | ||||
|         os: [ubuntu-20.04] | ||||
|         python:  | ||||
|           - 3.6.8 | ||||
|           - 3.7.9 | ||||
|           - 3.8.6 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v2 | ||||
|     - name: Install python version | ||||
|       uses: gabrielfalcao/pyenv-action@v7 | ||||
|       with: | ||||
|         default: "${{ matrix.python }}" | ||||
|         command: "pip install -U pip" | ||||
|     - name: Get pip cache dir | ||||
|       id: pip-cache | ||||
|       run: | | ||||
|         echo "::set-output name=dir::$(pip cache dir)" | ||||
|     - 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 }} | ||||
|       run: | | ||||
|         sudo apt-get update -qq | ||||
|         sudo apt-get install -qq libpoppler-cpp-dev unpaper tesseract-ocr imagemagick ghostscript optipng | ||||
|         pip install --upgrade pipenv | ||||
|         pipenv install --system --dev | ||||
|         cd src/ | ||||
|         pipenv run pytest --cov | ||||
|         pipenv run pycodestyle | ||||
|         pipenv run coveralls | ||||
|   documentation: | ||||
|     runs-on: ubuntu-20.04 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v2 | ||||
|     - name: Install python version | ||||
|       uses: gabrielfalcao/pyenv-action@v7 | ||||
|       with: | ||||
|         default: "3.6.8" | ||||
|         command: "pip install -U pip"     | ||||
|     - name: Get pip cache dir | ||||
|       id: pip-cache | ||||
|       run: | | ||||
|         echo "::set-output name=dir::$(pip cache dir)" | ||||
|     - name: Persistent Github pip cache | ||||
|       uses: actions/cache@v2 | ||||
|       with: | ||||
|         path: ${{ steps.pip-cache.outputs.dir }} | ||||
|         key: ${{ runner.os }}-pip3.6.8} | ||||
|     - name: dependencies | ||||
|       run: | | ||||
|         sudo apt-get update -qq | ||||
|         sudo apt-get install -qq libpoppler-cpp-dev unpaper tesseract-ocr imagemagick ghostscript optipng | ||||
|         pip install --upgrade pipenv | ||||
|         pipenv install --system --dev | ||||
|     - name: make | ||||
|       run: | | ||||
|         cd docs/ | ||||
|         make html | ||||
|   frontend: | ||||
|     runs-on: ubuntu-20.04 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v2 | ||||
|     - uses: actions/setup-node@v2 | ||||
|       with: | ||||
|         node-version: '15' | ||||
|     - name: build | ||||
|       run: | | ||||
|         cd src-ui/ | ||||
|         npm install -g @angular/cli | ||||
|         npm install | ||||
|         ng build --prod | ||||
|   # Build and push image to docker hub. | ||||
|   buildx: | ||||
|     runs-on: ubuntu-latest | ||||
							
								
								
									
										32
									
								
								.github/workflows/documentation.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								.github/workflows/documentation.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,32 @@ | ||||
| name: backend-tests | ||||
|  | ||||
| # always run documentation workflow to ensure the documentation can still be built | ||||
| on: push | ||||
|  | ||||
| # possibly add a publish job for automatic read-the-docs publishing | ||||
| jobs: | ||||
|   documentation: | ||||
|     runs-on: ubuntu-20.04 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v2 | ||||
|     - name: Install python version | ||||
|       uses: gabrielfalcao/pyenv-action@v7 | ||||
|       with: | ||||
|         default: "3.6.8" | ||||
|         command: "pip install -U pip"     | ||||
|     - name: Get pip cache dir | ||||
|       id: pip-cache | ||||
|       run: | | ||||
|         echo "::set-output name=dir::$(pip cache dir)" | ||||
|     - name: Persistent Github pip cache | ||||
|       uses: actions/cache@v2 | ||||
|       with: | ||||
|         path: ${{ steps.pip-cache.outputs.dir }} | ||||
|         key: ${{ runner.os }}-pip3.6.8} | ||||
|     - name: dependencies | ||||
|       run: | | ||||
|         pip install 'sphinx~=3.3' sphinx_rtd_theme | ||||
|     - name: make | ||||
|       run: | | ||||
|         cd docs/ | ||||
|         make html | ||||
							
								
								
									
										16
									
								
								.github/workflows/frontend.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								.github/workflows/frontend.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
|  | ||||
|  | ||||
| jobs: | ||||
|   frontend: | ||||
|     runs-on: ubuntu-20.04 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v2 | ||||
|     - uses: actions/setup-node@v2 | ||||
|       with: | ||||
|         node-version: '15' | ||||
|     - name: build | ||||
|       run: | | ||||
|         cd src-ui/ | ||||
|         npm install -g @angular/cli | ||||
|         npm install | ||||
|         ng build --prod | ||||
							
								
								
									
										43
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | ||||
| name: backend-tests | ||||
|  | ||||
| # always run tests workflow | ||||
| on: push | ||||
|  | ||||
| jobs: | ||||
|   tests: | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       matrix: | ||||
|         os: [ubuntu-20.04] | ||||
|         python:  | ||||
|           - 3.6.8 | ||||
|           - 3.7.9 | ||||
|           - 3.8.6 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v2 | ||||
|     - name: Install python version | ||||
|       uses: gabrielfalcao/pyenv-action@v7 | ||||
|       with: | ||||
|         default: "${{ matrix.python }}" | ||||
|         command: "pip install -U pip" | ||||
|     - name: Get pip cache dir | ||||
|       id: pip-cache | ||||
|       run: | | ||||
|         echo "::set-output name=dir::$(pip cache dir)" | ||||
|     - 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 }} | ||||
|       run: | | ||||
|         sudo apt-get update -qq | ||||
|         sudo apt-get install -qq libpoppler-cpp-dev unpaper tesseract-ocr imagemagick ghostscript optipng | ||||
|         pip install --upgrade pipenv | ||||
|         pipenv install --system --dev | ||||
|         cd src/ | ||||
|         pipenv run pytest --cov | ||||
|         pipenv run pycodestyle | ||||
|         pipenv run coveralls | ||||
		Reference in New Issue
	
	Block a user
	 Mark Schmitt
					Mark Schmitt