Skip to content

Rebuild

Rebuild #1259

Workflow file for this run

name: Rebuild
on:
schedule:
- cron: 30 2 * * *
jobs:
rebuild:
name: Rebuild
runs-on: ubuntu-22.04
timeout-minutes: 50
strategy:
fail-fast: false
matrix:
branch:
- test
steps:
- run: docker system prune --all --force
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
fetch-depth: 0
- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- run: python3 -m pip install --user --requirement=ci/requirements.txt
- name: Checks
run: c2cciutils-checks
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- run: make build
- run: make build-tests
- name: Init Docker volumes
run: |
docker run --rm --detach --name volumes --volume=tests:/tests --volume=results:/results alpine tail -f /dev/null
docker cp tests/ volumes:/tests/
- name: pytest
run: >
docker run --rm --env=PYTHONPATH=/opt/
--volume=results:/results --volume=tests:/tests
sbrunner/scan-to-paperless-tests bash -c '
cd /tests &&
pytest --durations=0 --verbose --color=yes
--profile --profile-svg --junitxml=/results/test-reports/junit.xml .'
- name: Extract data from Docker volumes
run: |
docker cp volumes:/results/ ./
mkdir -p results/
docker cp volumes:/tests/prof/ results/
- uses: actions/upload-artifact@v4
with:
name: results
path: results
if-no-files-found: ignore
retention-days: 5
if: failure()
- uses: actions/upload-artifact@v4
with:
name: Test report
path: results/test-reports
if-no-files-found: ignore
retention-days: 5
if: failure()
- run: docker login --username=${{ secrets.DOCKER_USERNAME }} --password=${{ secrets.DOCKER_PASSWORD }}
- name: Publish
run: c2cciutils-publish --group=docker --type=rebuild --branch=${{ matrix.branch }}
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
- run: make build-all
- name: Publish Docker all
run: |
c2cciutils-publish --group=docker-all
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
if: env.HAS_SECRETS == 'HAS_SECRETS'