44 push :
55 branches :
66 - master
7- pull_request :
8- branches_ignore : []
7+ pull_request : []
98
109jobs :
1110 formatting :
1211 runs-on : ubuntu-latest
1312 steps :
14- - uses : actions/checkout@v2
13+ - uses : actions/checkout@v3
1514
1615 - name : Check Spelling
1716 uses : crate-ci/typos@592b36d23c62cb378f6097a292bc902ee73f93ef # version 1.0.4
@@ -21,18 +20,12 @@ jobs:
2120 - name : Setup black linter
2221 run : conda create --quiet --name black pyflakes
2322
24- - name : Lint python code with black
23+ - name : Lint and format Python code
2524 run : |
2625 export PATH="/usr/share/miniconda/bin:$PATH"
2726 source activate black
28- pip install black
29- black --check spython
30-
31- - name : Check unused imports with pyflakes
32- run : |
33- export PATH="/usr/share/miniconda/bin:$PATH"
34- source activate black
35- pyflakes spython/oci spython/image.py spython/instance spython/main
27+ pip install -r .github/dev-requirements.txt
28+ pre-commit run --all-files
3629
3730 pytest :
3831 runs-on : ubuntu-latest
@@ -42,21 +35,17 @@ jobs:
4235 python-version : [3.7, 3.8, 3.9]
4336
4437 steps :
45- - uses : actions/checkout@v2
46- - uses : eWaterCycle/setup-singularity@bebf1d6f54f9d2d159ac5c15385912dc39b23711 # v7 release
47- with :
48- singularity-version : 3.8.4
38+ - uses : actions/checkout@v3
39+ - uses : singularityhub/install-singularity@main
4940 - name : Set up Python ${{ matrix.python-version }}
50- uses : actions/setup-python@v2
41+ uses : actions/setup-python@v4
5142 with :
5243 python-version : ${{ matrix.python-version }}
5344
5445 - name : Install dependencies
5546 run : |
56- sudo ln -s $SINGULARITY_ROOT/bin/singularity /usr/bin/
5747 python -m pip install --upgrade pip
5848 pip install pytest semver pytest-runner requests
5949
6050 - name : Run unit tests
61- run : |
62- pytest
51+ run : pytest -xs spython/tests/test*.py
0 commit comments