Skip to content

doc: open on colab #105

doc: open on colab

doc: open on colab #105

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python package
on:
push:
branches: [ "main" ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Install kaitai-struct-compiler
run: |
curl -LO https://github.com/kaitai-io/kaitai_struct_compiler/releases/download/0.10/kaitai-struct-compiler_0.10_all.deb
sudo apt-get install -y ./kaitai-struct-compiler_0.10_all.deb
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Submodule update
run: |
git submodule update --init
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest numpy
- name: Test
run: |
make test
- name: Build docs
if: matrix.python-version == '3.11'
run: |
python -m pip install .[docs]
mkdocs build
- name: Deploy docs
if: matrix.python-version == '3.11' && github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
mkdocs gh-deploy --force