Skip to content

Commit

Permalink
Add minimal CI testing on GH Actions (we already have more complete C…
Browse files Browse the repository at this point in the history
…I on EBRAINS GitLab)
  • Loading branch information
apdavison committed Nov 10, 2023
1 parent 291ebc7 commit a3407ec
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test Python client

on:
push:
branches: [ "api-v3" ]

permissions:
contents: read

jobs:
test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-provider.txt
pip install flake8 pytest pytest-cov pytest-mock
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 nmpi --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 nmpi --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest --cov=nmpi --cov-report=term test/test_mock.py
2 changes: 1 addition & 1 deletion nmpi/nmpi_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ def send_job_to_kg(self, job_id):
if is_url(job["code"]):
# need to distinguish between zip files, Github repos, ...
raise NotImplementedError("to do")
inputs = File, ModelVersionReference, SoftwareVersion
### inputs = File, ModelVersionReference, SoftwareVersion
else:
# job code is stored as text within NMPI DB
# we need to create a Python file within the associated collab
Expand Down

0 comments on commit a3407ec

Please sign in to comment.