@@ -2,9 +2,13 @@ name: Complete testing matrix
22
33on :
44 push :
5- branches : [ devel, master ]
5+ branches :
6+ - devel
7+ - master
68 pull_request :
7- branches : [ devel, master ]
9+ branches :
10+ - devel
11+ - master
812
913jobs :
1014 build :
@@ -14,51 +18,63 @@ jobs:
1418 strategy :
1519 matrix :
1620 os : [ubuntu-latest]
17- # macOS-latest: issue with latex
18- # windows-latest: issue with TcL install error
19- python-version : ['3.8', '3. 9', '3.10', '3.11']
21+ # macOS-latest: issue with latex + meson fails build
22+ # windows-latest: issue with TcL install error + meson fails to build
23+ python-version : ['3.9', '3.10', '3.11']
2024 exclude :
2125 - python-version : ['3.11']
2226 os : windows-latest
2327
2428 steps :
29+
30+ # Install latex
2531 - name : Install latex for matplotlib
32+ shell : bash
2633 run : |
2734 if [ "$RUNNER_OS" == "Linux" ]; then
28- sudo apt-get install texlive texlive-latex-extra texlive-fonts-recommended dvipng cm-super
29- pip install latex
35+ sudo apt update
36+ sudo apt install texlive texlive- latex-extra texlive-fonts-recommended dvipng cm-super
3037 elif [ "$RUNNER_OS" == "macOS" ]; then
31- # not enough to fix latex issue
32- brew install --cask mactex
33- pip install latex
34- else
38+ # not enough to fix latex issue
39+ sudo brew install --cask mactex
40+ elif [ "$RUNNER_OS" != "Linux" ]; then
3541 echo "$RUNNER_OS not supported"
36- exit 1
42+ exit 0
3743 fi
38- - uses : actions/checkout@v4
39- - name : Set up Python ${{ matrix.python-version }}
40- uses : actions/setup-python@v5
44+
45+ # git checkout
46+ - name : git checkout
47+ uses : actions/checkout@v5
4148 with :
42- python-version : ${{ matrix.python-version }}
43- - name : Install dependencies
49+ # https://github.com/marketplace/actions/checkout#usage
50+ fetch-depth : 0 # to fetch all history from all branches
51+ fetch-tags : true
52+
53+ # Install uv
54+ - name : Install uv
55+ uses : astral-sh/setup-uv@v5
56+ with :
57+ python-version : ${{ matrix.python-version }}
58+
59+ # Build dist
60+ - name : Build the project
4461 run : |
45- curl -X PURGE https://pypi.org/simple/datastock/
46- curl -X PURGE https://pypi.org/simple/bsplines2d/
47- curl -X PURGE https://pypi.org/simple/spectrally/
48- pip install --upgrade pip
49- pip install flake8 pytest coverage wheel
50- pip install -r requirements.txt --no-cache
51- - name : Lint with flake8
62+ uv build
63+
64+ # Create and activate env
65+ - name : Create and activate env
5266 run : |
53- # stop the build if there are Python syntax errors or undefined names
54- # flake8 . --count --select=E9,F63,F7,F82 --show- source --statistics
55- flake8 . --count --select=E9,F63,F7 --show-source --statistics
56- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
57- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
58- - name : install tofu
67+ uv venv venv --python ${{ matrix.python-version }}
68+ source .venv/bin/activate
69+ uv pip install latex
70+
71+ # Install library
72+ - name : Install the project
5973 run : |
60- python -c "import setuptools; print(f'\nsetuptools version = {setuptools.__version__}\n')"
61- pip install -e ".[dev]" --no-build-isolation
74+ uv pip install ./dist/*.whl
75+
76+ # Run tests
6277 - name : Test with pytest and coverage
6378 run : |
64- coverage run --source=tofu/ -m pytest tofu/tests -v -x --durations=10
79+ cd ./dist/
80+ pytest --pyargs tofu.tests -xv --durations=10
0 commit comments