Skip to content

Add secure_exe and NullCommand #42

Add secure_exe and NullCommand

Add secure_exe and NullCommand #42

Workflow file for this run

name: Py4LO
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Before install
run: |
sudo apt-get install -y --fix-missing libreoffice libreoffice-script-provider-python python3-uno
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Check with ruff
run: |
ruff check
- name: set PYTHONPATH
run: |
ls -R $GITHUB_WORKSPACE
echo "PYTHONPATH=$GITHUB_WORKSPACE/lib/:$GITHUB_WORKSPACE/py4lo/:/usr/lib/python3/dist-packages/" >> "$GITHUB_ENV"
- name: Test with pytest & generate coverage report
run: |
echo "$PYTHONPATH"
python -m pytest --cov-report term-missing --ignore=examples --cov=py4lo --cov=lib --cov-report=xml
python -m pytest --cov-report term-missing --ignore=examples --ignore=test --ignore="py4lo/__main__.py" --cov-append --doctest-modules --cov=lib --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
verbose: true