1+ name : Test Pull Request
2+
3+ on : [pull_request]
4+
5+ jobs :
6+ lint :
7+ runs-on : ubuntu-latest
8+ strategy :
9+ matrix :
10+ python-version : ['3.8']
11+ steps :
12+ - uses : actions/checkout@v1
13+ - uses : actions/setup-python@v4
14+ with :
15+ python-version : ${{ matrix.python-version }}
16+ - name : Cache .cache/pip
17+ uses : actions/cache@v3
18+ id : cache-pip
19+ with :
20+ path : ~/.cache/pip
21+ key : pip_cache_py_${{ matrix.python-version }}
22+ - name : Install package
23+ run : pip install -r requirements.txt black==23.3 flake8==6.0
24+ - name : Flake8
25+ run : flake8 --ignore=C901,W503
26+ - name : Black
27+ uses : psf/black@23.3.0
28+
29+ test :
30+ runs-on : ubuntu-latest
31+ strategy :
32+ matrix :
33+ python-version : ['3.8']
34+ steps :
35+ - uses : actions/checkout@v1
36+ - uses : actions/setup-python@v4
37+ with :
38+ python-version : ${{ matrix.python-version }}
39+ - name : Cache .cache/pip
40+ uses : actions/cache@v3
41+ id : cache-pip
42+ with :
43+ path : ~/.cache/pip
44+ key : pip_cache_py_${{ matrix.python-version }}
45+ - name : install package
46+ run : python -m pip install .
47+ - name : install packages for testing
48+ run : pip install nose xmldiff
49+
50+ - name : Run smoke test on example
51+ run : |
52+ python examples/example.py > tmp.xml
53+ xmldiff --check tmp.xml examples/tool.xml
54+ python examples/example_macros.py > tmp.xml
55+ xmldiff --check tmp.xml examples/example_macros.xml
56+
57+ - name : diff_pydocstyle_report
58+ run : make diff_pydocstyle_report
59+ - name : Test
60+ run : make test
61+ - name : Planemo lint tools
62+ run : planemo l tests/test-data/
63+ # planemo test content of tests/test-data (this is OK, because the previous
64+ # tests ensure equality of the xmls that are generated and those in the package)
65+ - name : planemo test tools
66+ run : export PATH=$(pwd)/tests/test-data:$PATH && planemo t tests/test-data/
0 commit comments