77 branches : [ main ]
88
99env :
10- PYTHON_VERSION : " 3.10 "
10+ PYTHON_VERSION : " 3.12 "
1111 PIPELINE_FAMILY : " general"
1212
1313jobs :
2020 with :
2121 path : |
2222 .venv
23- key : ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/base .txt') }}
23+ key : ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/* .txt') }}
2424 - name : Set up Python ${{ env.PYTHON_VERSION }}
2525 uses : actions/setup-python@v5
2626 with :
4242 with :
4343 path : |
4444 .venv
45- key : ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/base .txt') }}
45+ key : ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/* .txt') }}
4646 - name : Lint
4747 run : |
4848 source .venv/bin/activate
5656 uses : ludeeus/action-shellcheck@master
5757
5858 test :
59- runs-on : ubuntu-latest-m
59+ runs-on : ubuntu-latest
6060 needs : [setup, lint]
6161 steps :
6262 - uses : actions/checkout@v4
@@ -65,16 +65,22 @@ jobs:
6565 with :
6666 path : |
6767 .venv
68- key : ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/base.txt') }}
68+ key : ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/test.txt') }}
69+
70+ - name : Set up Python ${{ env.PYTHON_VERSION }}
71+ uses : actions/setup-python@v5
72+ with :
73+ python-version : ${{ env.PYTHON_VERSION }}
6974 - name : Run core tests
7075 run : |
76+ python${{ env.PYTHON_VERSION }} -m venv .venv
7177 source .venv/bin/activate
7278 sudo apt-get update && sudo apt-get install --yes poppler-utils libreoffice
79+ make install-test
7380 make install-pandoc
7481 sudo add-apt-repository -y ppa:alex-p/tesseract-ocr5
7582 sudo apt-get install -y tesseract-ocr tesseract-ocr-kor
7683 tesseract --version
77- make install-nltk-models
7884 make test
7985 make check-coverage
8086
@@ -97,19 +103,26 @@ jobs:
97103 # TODO - figure out best practice for caching docker images
98104 # (Using the virtualenv to get pytest)
99105 test_dockerfile :
100- runs-on : ubuntu-latest-m
106+ runs-on : ubuntu-latest
101107 needs : [setup, lint]
102108 steps :
103109 - uses : actions/checkout@v4
104110 - uses : actions/cache@v4
105111 id : virtualenv-cache
106112 with :
113+ python-version : ${{ env.PYTHON_VERSION }}
107114 path : |
108115 .venv
109- key : ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/base.txt') }}
116+ key : ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/test.txt') }}
117+ - name : Set up Python ${{ env.PYTHON_VERSION }}
118+ uses : actions/setup-python@v5
119+ with :
120+ python-version : ${{ env.PYTHON_VERSION }}
110121 - name : Test Dockerfile
111122 run : |
123+ python${{ env.PYTHON_VERSION }} -m venv .venv
112124 source .venv/bin/activate
125+ make install-test
113126 make docker-build
114127 make docker-test
115128 # - name: Scan image
0 commit comments