Skip to content

Workflow file for this run

name: Release - pip package
on:
push:
branches: [ 'release/*' ]
tags: ['v*']
pull_request:
branches: [ 'master', 'release/*' ]
release:
types: [published]
jobs:
# # long running tests and check of image generation
# full_test:
# strategy:
# matrix:
# python-version: ['3.9', '3.10', '3.11', '3.12']
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -r requirements.txt
# pip install -r tests/requirements-test.txt
# - name: Run all test with pytest
# run: |
# pytest -k "slow"
# - name: Check images generation for documentation
# run: |
# cd docs/images_generation && ./run.sh
# # test if package generation works and optional package upload to pypi (only on release)
# make_and_upload_package:
# runs-on: ubuntu-latest
# needs: [full_test]
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: '3.11'
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -r requirements.txt
# - name: Make wheel package and validate it
# run: |
# pip install wheel twine
# # first call to version method would generate VERSION file
# PYTHONPATH=. python pymchelper/run.py --version
# python setup.py bdist_wheel
# twine check dist/*.whl
# # makes source package
# python setup.py sdist
# - name: publish package to pypi
# uses: pypa/gh-action-pypi-publish@v1.12.2
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# with:
# password: ${{ secrets.TWINE_PASSWORD }}
# packages-dir: dist/
# verbose: true
# print-hash: true
generate_docs:
runs-on: ubuntu-latest
# needs: [make_and_upload_package]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all history, as by default only last 1 commit is fetched
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build Sphinx documentation
run: |
sphinx-apidoc --output-dir docs/apidoc/ pymchelper
sphinx-build --jobs auto docs docs/_build
- name: Upload documentation artifact
uses: actions/upload-artifact@v4
with:
name: sphinx-docs
path: docs/_build
- name: Debug output directory
run: |
find docs/_build -type l
deploy_docs:
runs-on: ubuntu-latest
needs: [generate_docs]
environment:
name: github-pages
permissions:
pages: write
id-token: write
steps:
- name: Download documentation artifact
uses: actions/download-artifact@v4
with:
name: sphinx-docs
path: test
- name: Inspect downloaded files
run: |
ls -l test
- name: Check for symlink
run: |
find test -type l
- name: List recursively all files, including their permissions, including hidden files:

Check failure on line 142 in .github/workflows/release-pip.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release-pip.yml

Invalid workflow file

You have an error in your yaml syntax on line 142
run: |
ls -laR test
- name: List all files (recursively), which miss reading permission for others
run: |
find test -type f ! -perm /o+r
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
with:
artifact_name: sphinx-docs