Skip to content

config.py: fix yaml.load() invocation in recent version #17

config.py: fix yaml.load() invocation in recent version

config.py: fix yaml.load() invocation in recent version #17

Workflow file for this run

name: Milkcheck
on: [workflow_dispatch, push, pull_request]
permissions:
contents: read
pull-requests: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install nose clustershell pylint
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Setup SSH keys
run: |
ssh-keygen -t rsa -f ~/.ssh/id_rsa -N ""
cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
- name: Configure NodeSet
run: |
mkdir -p ~/.config/clustershell/groups.d ~/.config/clustershell/groups.conf.d
cat >>~/.config/clustershell/groups.conf <<EOF
[Main]
default: local
confdir: $CFGDIR/groups.conf.d
autodir: $CFGDIR/groups.d
[local]
map: [ -f $CFGDIR/groups ] && f=$CFGDIR/groups || f=$CFGDIR/groups.d/local.cfg; sed -n 's/^$GROUP:\(.*\)/\1/p' $f
all: [ -f $CFGDIR/groups ] && f=$CFGDIR/groups || f=$CFGDIR/groups.d/local.cfg; sed -n 's/^all:\(.*\)/\1/p' $f
list: [ -f $CFGDIR/groups ] && f=$CFGDIR/groups || f=$CFGDIR/groups.d/local.cfg; sed -n 's/^\([0-9A-Za-z_-]*\):.*/\1/p' $f
EOF
- name: Lint with pylint
run: |
export PYTHONPATH=$PWD/lib/
pylint lib/
rc=$?
fatal=$((rc & 1))
error=$((rc & 2))
invocation=$((rc & 32))
exit $((fatal + error + invocation))
- name: Test with nosetests
run: |
export PYTHONPATH=$PWD/lib/
nosetests --exe --all-modules -w tests --with-coverate