Skip to content

CLI/Nodeset: omit @source: prefix for cluset -s source -L (#563) (#570) #277

CLI/Nodeset: omit @source: prefix for cluset -s source -L (#563) (#570)

CLI/Nodeset: omit @source: prefix for cluset -s source -L (#563) (#570) #277

Workflow file for this run

name: ClusterShell nosetests
on: [push, pull_request, merge_group]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
include:
- os: ubuntu-20.04
python-version: '3.6'
name: Tests with Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coverage nose-py3 .
- name: Allow us to SSH passwordless to localhost
run: |
chmod og-rw ~
ssh-keygen -f ~/.ssh/id_rsa -N ""
cp ~/.ssh/{id_rsa.pub,authorized_keys}
- name: Avoid ssh "known hosts" warnings
run: |
printf '%s\n %s\n %s\n' 'Host *' 'StrictHostKeyChecking no' 'LogLevel ERROR' >> ~/.ssh/config
- name: Set Python paths when sshing for gateway tests
run: |
sed -i "1iexport CLUSTERSHELL_GW_PYTHON_EXECUTABLE=$(which python)" ~/.bashrc
sed -i "2iexport PYTHONPATH=\$PYTHONPATH:$(realpath $pythonLocation/lib/python*/site-packages)" ~/.bashrc
head ~/.bashrc
- name: Install pdsh to test WorkerPdsh
run: |
sudo apt-get -y install pdsh
sudo sh -c 'echo ssh > /etc/pdsh/rcmd_default'
- name: Post to Slack (start)
continue-on-error: true
id: slack-start
uses: slackapi/[email protected]
with:
channel-id: 'C07GRMDK3'
payload: |
{
"text": "${{ github.workflow }}: Python ${{ matrix.python-version }} tests started (In Progress)",
"attachments": [
{
"color": "#ECB32D",
"fields": [
{
"title": "Branch",
"short": true,
"value": "${{ github.ref }}"
},
{
"title": "Actor",
"short": true,
"value": "${{ github.actor }}"
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: Run tests
id: tests
run: |
python --version
export CLUSTERSHELL_GW_PYTHON_EXECUTABLE=$(which python)
nosetests -v --all-modules --with-coverage --cover-tests --cover-erase --cover-package=ClusterShell tests
- name: Post to Slack (end)
if: always()
continue-on-error: true
id: slack-end
uses: slackapi/[email protected]
with:
channel-id: 'C07GRMDK3'
update-ts: ${{ steps.slack-start.outputs.ts }}
payload: |
{
"text": "${{ github.workflow }}: Python ${{ matrix.python-version }} tests completed",
"attachments": [
{
"fields": [
{
"title": "Branch",
"short": true,
"value": "${{ github.ref }}"
},
{
"title": "Status",
"short": true,
"value": "${{ job.status }}"
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}