Package for uv and pyproject.toml and meson
#749
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Complete testing matrix | |
| on: | |
| push: | |
| branches: | |
| - devel | |
| - master | |
| pull_request: | |
| branches: | |
| - devel | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| # macOS-latest: issue with latex | |
| # windows-latest: issue with TcL install error | |
| python-version: ['3.9', '3.10', '3.11', '3.12'] | |
| exclude: | |
| - python-version: ['3.11'] | |
| os: windows-latest | |
| steps: | |
| # Install latex | |
| - name: Install latex for matplotlib | |
| run: | | |
| if [ "$RUNNER_OS" == "Linux" ]; then | |
| sudo apt install texlive texlive-latex-extra texlive-fonts-recommended dvipng cm-super | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| # not enough to fix latex issue | |
| brew install --cask mactex | |
| else | |
| echo "$RUNNER_OS not supported" | |
| exit 1 | |
| fi | |
| # git checkout | |
| - name: git checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| # https://github.com/marketplace/actions/checkout#usage | |
| fetch-depth: 0 # to fetch all history from all branches | |
| fetch-tags: true | |
| # Install uv | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # Build dist | |
| - name: Build the project | |
| run: | | |
| uv build | |
| # Create and activate env | |
| - name: Create and activate env | |
| run: | | |
| uv venv venv --python ${{ matrix.python-version }} | |
| source .venv/bin/activate | |
| uv pip install latex | |
| # Install library | |
| - name: Install the project | |
| run: | | |
| uv pip install ./dist/*.whl | |
| # Run tests | |
| - name: Test with pytest and coverage | |
| run: | | |
| cd ./dist/ | |
| pytest --pyargs tofu.tests -xv --durations=10 |