@@ -5,36 +5,32 @@ name: pybeamline
55
66on :
77 push :
8- branches : [ "master" ]
8+ branches : ["master"]
99 pull_request :
10- branches : [ "master" ]
10+ branches : ["master"]
1111
1212jobs :
1313 build :
14-
1514 runs-on : ubuntu-latest
1615 strategy :
1716 fail-fast : false
1817 matrix :
19- python-version : ["3.10", "3.11", "3.12 "]
18+ python-version : ["3.9 "]
2019
2120 steps :
22- - uses : actions/checkout@v4
23- - name : Set up Python ${{ matrix.python-version }}
24- uses : actions/setup-python@v3
25- with :
26- python-version : ${{ matrix.python-version }}
27- - name : Install dependencies
28- run : |
29- python -m pip install --upgrade pip
30- python -m pip install flake8 pytest
31- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
32- - name : Lint with flake8
33- run : |
34- # stop the build if there are Python syntax errors or undefined names
35- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38- - name : Run tests
39- run : |
40- python -m unittest discover -s tests
21+ - uses : actions/checkout@v4
22+
23+ - name : Set up Python ${{ matrix.python-version }}
24+ uses : actions/setup-python@v5
25+ with :
26+ python-version : ${{ matrix.python-version }}
27+ cache : " pip"
28+
29+ - name : Install project + dev deps (from pyproject.toml)
30+ run : |
31+ python -m pip install --upgrade pip
32+ pip install -e ".[test]"
33+
34+ - name : Run tests
35+ run : |
36+ python -m unittest discover -s tests
0 commit comments