Test Setup #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2024 geisserml <geisserml@gmail.com> | |
# SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause | |
name: Test Setup | |
on: | |
workflow_dispatch: | |
workflow_call: | |
defaults: | |
run: | |
shell: bash | |
# TODO consider inlining setup test into build_packages:test job ? | |
jobs: | |
test_setup: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | |
py: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.py }} | |
- name: Check out pypdfium2 repository | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.repository }} | |
fetch-depth: 0 # quick fix for `git describe` | |
# FIXME Should we run the test suite after each way of installing? | |
- name: Setup (default) | |
run: python3 -m pip install . | |
- name: Setup (editable) | |
run: python3 -m pip install -e . | |
- name: Install/update deps for non-isolated setup | |
run: python3 -m pip install -U -r req/setup.txt -r req/test.txt -r req/docs.txt | |
- name: Setup (default, no isolation) | |
run: python3 -m pip install --no-build-isolation . | |
- name: Setup (editable, no isolation) | |
run: python3 -m pip install --no-build-isolation -e . | |
- name: Build documentation | |
run: ./run docs-build | |
- name: Run test suite | |
run: ./run test |