Skip to content

[pre-commit.ci] pre-commit autoupdate #812

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #812

name: Continuous Integration
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
continuous-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build the tests docker container
uses: docker/build-push-action@v3.1.1
with:
tags: jstockwin/py-pdf-parser-test:test
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
load: true
# This ugly bit is necessary if you don't want your cache to grow forever
# till it hits GitHub's limit of 5GB.
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Run test
run: | # Note we need '-uroot' so user has permissions to github.workspace
docker run --rm -uroot --volume ${{ github.workspace }}:/py-pdf-parser \
jstockwin/py-pdf-parser-test:test .github/scripts/test.sh
- name: Check docs build correctly
run: docker run --rm jstockwin/py-pdf-parser-test:test .github/scripts/docs.sh