File tree Expand file tree Collapse file tree 6 files changed +74
-34
lines changed Expand file tree Collapse file tree 6 files changed +74
-34
lines changed Original file line number Diff line number Diff line change
1
+ name : PySlurm
2
+ on : [push]
3
+ jobs :
4
+ Build :
5
+ runs-on : ubuntu-20.04
6
+ strategy :
7
+ matrix :
8
+ python-version :
9
+ - " 3.6"
10
+ - " 3.7"
11
+ - " 3.8"
12
+ - " 3.9"
13
+ fail-fast : false
14
+ steps :
15
+ - name : Checkout repository code
16
+ uses : actions/checkout@v2
17
+ - name : Set up Python ${{ matrix.python-version }}
18
+ uses : actions/setup-python@v2
19
+ with :
20
+ python-version : ${{ matrix.python-version }}
21
+ - name : Install Dependencies
22
+ run : |
23
+ which python
24
+ which python${{ matrix.python-version }}
25
+ python${{ matrix.python-version }} -m pip install --upgrade pip
26
+ python${{ matrix.python-verison }} -m pip install pipenv
27
+ pipenv --python ${{matrix.python-version }} install --dev --skip-lock
28
+ - name : Start Slurm Container
29
+ uses : sudo-bot/action-docker-compose@latest
30
+ with :
31
+ cli-args : " -f docker-compose-github.yml up -d"
32
+ env :
33
+ PYTHON : ${{ matrix.python-version }}
34
+ - name : Debug
35
+ run : |
36
+ docker ps -a
37
+ docker version
38
+ pwd
39
+ ls -al
40
+ docker inspect slurmctl
41
+ env | sort
42
+ - name : Build/Install/Test PySlurm
43
+ run : |
44
+ pipenv run pytest -sv scripts/run_tests_in_container.py
45
+ env :
46
+ PYTHON : ${{ matrix.python-version }}
47
+
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
PySlurm: Slurm Interface for Python
3
3
***********************************
4
4
5
- .. image :: https://travis-ci.org /PySlurm/pyslurm.svg?branch=20.11
6
- :target: https://travis-ci.org /PySlurm/pyslurm
5
+ .. image :: https://github.com /PySlurm/pyslurm/actions/workflows/pyslurm.yml/badge.svg
6
+ :target: https://github.com /PySlurm/pyslurm/actions/workflows/pyslurm.yml
7
7
8
8
Overview
9
9
========
Original file line number Diff line number Diff line change
1
+ version : " 3.8"
2
+
3
+ services :
4
+ slurm :
5
+ image : giovtorres/docker-centos7-slurm:20.11.8
6
+ hostname : slurmctl
7
+ container_name : slurmctl
8
+ stdin_open : true
9
+ tty : true
10
+ working_dir : /pyslurm
11
+ environment :
12
+ PYTHON : " 3.9"
13
+ volumes :
14
+ - ${RUNNER_WORKSPACE}/pyslurm:/pyslurm
Original file line number Diff line number Diff line change
1
+ """Execute pytest inside the container."""
2
+
3
+ import os
4
+
1
5
import testinfra
2
6
3
7
4
8
def test_run ():
5
9
host = testinfra .get_host (f"docker://slurmctl" )
6
- print (host .check_output ("python3.9 setup.py build" ))
7
- print (host .check_output ("python3.9 setup.py install" ))
10
+ python = f'python{ os .environ .get ("PYTHON" )} '
11
+ print (host .check_output (f"{ python } setup.py build" ))
12
+ print (host .check_output (f"{ python } setup.py install" ))
8
13
print (host .check_output ("./scripts/configure.sh" ))
14
+ print (host .check_output (f"{ python } -m pip uninstall --yes pytest" ))
15
+ print (host .check_output (f"{ python } -m pip install pytest" ))
9
16
print (host .check_output ("pytest -v" ))
You can’t perform that action at this time.
0 commit comments