Skip to content

Commit

Permalink
tests: add github actions (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
cedeyn authored Jul 24, 2024
1 parent 56be21d commit 4e85185
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Unit tests
run-name: Shine Unit tests
on: [workflow_dispatch, push, pull_request]

permissions:
contents: read
pull-requests: read


jobs:
launch_tests:
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 -r requirements.txt
pip install clustershell
pip install nose
pip install coverage
- name: Set up passordless ssh connection
run: |
ssh-keygen -f ~/.ssh/id_rsa -N ""
cp ~/.ssh/{id_rsa.pub,authorized_keys}
# Avoid ssh "known hosts" warnings
echo -e 'Host *\n StrictHostKeyChecking no\n LogLevel ERROR' \
>> ~/.ssh/config
- name: Run nosetests
run: |
cd tests
PYTHONPATH=$PYTHONPATH:$PWD/../lib nosetests \
-v --all-modules \
--with-coverage
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
# Compiled python modules.
*.pyc

# backup files
*~

# Setuptools distribution folder.
/dist/
/build/

# Python egg metadata, regenerated from source files by setuptools.
/lib/*.egg-info
Expand Down

0 comments on commit 4e85185

Please sign in to comment.