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