Improved the tests and found some bugs. #22
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: Python Package Test | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv and project dependencies | |
| # This step installs uv, creates a virtual environment, | |
| # and installs the current project (vispipe) into it. | |
| run: | | |
| python -m pip install uv | |
| uv venv | |
| uv pip install . | |
| shell: bash | |
| - name: Run tests | |
| # This step activates the environment and then runs the commands. | |
| # This ensures the 'vispipe' command is found. | |
| run: | | |
| set -e | |
| # Activate venv | |
| if [ "$RUNNER_OS" == "Windows" ]; then | |
| source .venv/Scripts/activate | |
| else | |
| source .venv/bin/activate | |
| fi | |
| # Navigate and run tests | |
| cd example | |
| uv pip install . | |
| vispipe --swap_settings settings.json | |
| vispipe -v config.json | |
| shell: bash | |
| - name: Upload Test Output (PNGs) | |
| # This step runs regardless of whether the previous steps succeeded or failed | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| # The name of the artifact that will be uploaded | |
| name: test-output-${{ matrix.os }}-py${{ matrix.python-version }} | |
| # The path to the files to upload (all .png files in the examples directory) | |
| path: | | |
| example/pngs/*.png | |
| example/*.pdf | |
| # How long to keep the artifacts (optional, default is 90 days) | |
| retention-days: 7 |