Milkcheck tests suite #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Milkcheck | |
run-name: Milkcheck tests suite | |
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 | |
uses: actions/setup-python@v5 | |
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: | | |
# Tiny hack to make fail-under works with pylint... | |
failunder="8.71" | |
echo "fail-under=${failunder}" >pylintrc | |
export PYTHONPATH=$PWD/lib/ | |
pylint lib/ -ry --fail-under=${failunder} | |
- name: Test with nosetests | |
run: | | |
ls /bin/true | |
true | |
/bin/true | |
export PYTHONPATH=$PWD/lib/ | |
nosetests --exe --all-modules -w tests --with-coverage |