Skip to content

build(deps): bump github/codeql-action from 2 to 3 #89

build(deps): bump github/codeql-action from 2 to 3

build(deps): bump github/codeql-action from 2 to 3 #89

Workflow file for this run

name: Test Package
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
xpdf_gpg_key: 'gpg-key.txt'
xpdf_gpg_sig: 'xpdf-tools-linux-4.04.tar.gz.sig'
xpdf_bin_comp: 'xpdf-tools-linux-4.04.tar.gz'
xpdf_tools_dir: 'xpdf-tools-linux-4.04'
jobs:
test_lint:
name: Test and lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: |
echo "::group::Pip dependencies"
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade -r requirements-dev.txt -r requirements.txt
echo "::endgroup::"
- name: Cache xpdf tools
id: cache-xpdf
uses: actions/cache@v3
with:
path: .xpdf/download
key: ${{ runner.os }}-${{ hashFiles('**/.xpdf/download/${{ env.xpdf_gpg_key }}', '**/.xpdf/download/${{ env.xpdf_gpg_sig }}', '**/.xpdf/download/${{ env.xpdf_bin_comp }}') }}
- name: Set up xpdf tools
run: |
echo "::group::xpdf tools"
python install_xpdf.py \
--download-dir=.xpdf/download \
--install-dir=.xpdf/install \
--gpg-key-url=https://www.xpdfreader.com/${{ env.xpdf_gpg_key }} \
--file-sig-url=https://dl.xpdfreader.com/${{ env.xpdf_gpg_sig }} \
--file-comp-url=https://dl.xpdfreader.com/${{ env.xpdf_bin_comp }}
echo "::endgroup::"
# run tests using tox
# https://tox.wiki/en/latest/config.html#conf-basepython
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#running-tests-with-tox
- name: Run tox
run: |
export TEST_INCLUDE_SLOW=true
export TEST_XPDF_EXE_DIR=.xpdf/install/${{ env.xpdf_tools_dir }}/bin64
python -X dev -m tox -e py