Skip to content

Merge branch 'main' into v2 #98

Merge branch 'main' into v2

Merge branch 'main' into v2 #98

Workflow file for this run

name: Push workflow for ocfl-py
on:
push:
branches-ignore:
- "main"
jobs:
tests_job:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pycodestyle pydocstyle pylint # For testing and linting
- name: Lint with pycodestyle
run: |
pycodestyle --ignore=E501,W503 *.py ocfl tests
- name: Lint with pydocstyle
run: |
pydocstyle *.py ocfl tests
- name: Lint with pylint
run: |
pylint --disable=line-too-long,raise-missing-from,fixme,redefined-builtin,invalid-name,consider-using-f-string,too-many-instance-attributes,too-many-return-statements,too-many-branches,too-many-arguments,too-many-locals,too-many-statements,too-many-nested-blocks,broad-exception-raised,superfluous-parens,duplicate-code *.py ocfl
pylint --disable=line-too-long,fixme,invalid-name,consider-using-f-string,too-many-statements,duplicate-code,protected-access tests
- name: Test with pytest
run: |
pytest
documentation_job:
needs: tests_job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- uses: actions/checkout@v4
with:
submodules: true
- name: Update error codes
run: |
./extract_codes.py
- name: Build demo documenation
run: |
./build_demo_docs.sh
- name: Update github
run: |
gh pr comment $PR --body "Tests succeeded. Updating extracted errors codes and demo documentation..."
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Update error codes and demo docs [actions skip]" docs
git push --verbose
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE: ${{ github.event.pr.html_url }}