Add function to check python readme links are valid and absolute #265
Workflow file for this run
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
name: Python - build and test python package | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- 'python/**' | |
- 'rust/**' | |
- 'tests_data/**' | |
- '.github/workflows/**' | |
pull_request: | |
paths: | |
- 'python/**' | |
- 'rust/**' | |
- 'tests_data/**' | |
- '.github/workflows/**' | |
permissions: | |
contents: read | |
jobs: | |
e2e-testing: | |
strategy: | |
matrix: | |
python-version: [ "3.8.x", "3.9.x", "3.10.x", "3.11.x", "3.12.x" ] | |
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 | |
- name: Setup Python | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # pin@v5 | |
with: | |
python-version: '${{ matrix.python-version }}' | |
- name: Install uv | |
run: curl -LsSf https://astral.sh/uv/0.4.7/install.sh | sh | |
# It's OK to use the default python version and not the specified one | |
- name: Install all projects dependencies | |
working-directory: python | |
run: uv sync --all-extras --dev | |
- name: Build the python package | |
working-directory: python | |
run: uv run ./scripts/build_python_package.py | |
- name: List wheels | |
working-directory: python | |
run: python -c "import os; print('\n'.join(os.listdir('dist')))" | |
- name: Install the magika package | |
working-directory: python | |
run: python -m pip install $(python -c "import glob; print(glob.glob('dist/magika-*.whl')[0])") | |
shell: bash # Allows for cross-platform | |
- name: Run magika --version | |
working-directory: python | |
run: magika --version | |
shell: bash # Allows for cross-platform | |
- name: Run magika with tests_data | |
run: magika -r tests_data/basic | |
- name: Run "magika cli" quick tests | |
run: python ./python/scripts/run_quick_test_magika_cli.py | |
- name: Run "magika module" quick tests | |
run: python ./python/scripts/run_quick_test_magika_module.py |