Dockerfile fix #90
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: CI-LINUX | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| tests: | |
| name: "Build and test for Python ${{ matrix.python-version }}" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.11" | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@v4 | |
| - name: Install system packages (apt) | |
| shell: bash | |
| run: | | |
| sudo apt-get update | |
| # Install required Linux packages from installation/packagelist_linux.txt | |
| # - Strip comments/blank lines; don't run if list is empty (-r) | |
| grep -vE '^\s*#|^\s*$' installation/packagelist_linux.txt | \ | |
| xargs -r sudo apt-get install -y --no-install-recommends | |
| sudo apt-get clean | |
| sudo rm -rf /var/lib/apt/lists/* | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| installation/constraints.txt | |
| installation/requirements-core.txt | |
| installation/requirements-dev.txt | |
| installation/requirements-viz.txt | |
| installation/requirements-docs.txt | |
| installation/requirements-diagrams.txt | |
| - name: Create and activate venv, install deps (uv) | |
| shell: bash | |
| run: | | |
| python -m venv .venv | |
| echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> "$GITHUB_ENV" | |
| echo "$GITHUB_WORKSPACE/.venv/bin" >> "$GITHUB_PATH" | |
| python -m pip install --upgrade pip | |
| pip install uv | |
| uv pip install -r ./installation/constraints.txt | |
| uv pip install -r ./installation/requirements-core.txt | |
| uv pip install -r ./installation/requirements-dev.txt | |
| uv pip install -r ./installation/requirements-viz.txt | |
| uv pip install -r ./installation/requirements-docs.txt | |
| uv pip install -r ./installation/requirements-diagrams.txt | |
| - name: Run pytest | |
| shell: bash | |
| run: | | |
| pytest --ignore=tests/test_simulated_user_run.py | |
| - name: Upload coverage data | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: covdata-${{ matrix.python-version }} | |
| path: .coverage* | |
| overwrite: true | |
| include-hidden-files: true | |
| if-no-files-found: ignore | |
| coverage: | |
| name: Coverage | |
| needs: tests | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Download coverage data | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: covdata-* | |
| merge-multiple: true | |
| - name: Generate coverage report | |
| shell: bash | |
| run: | | |
| python -Im pip install --upgrade coverage[toml] | |
| # Combine any downloaded coverage files into a single database | |
| python -Im coverage combine || true | |
| # Generate reports (will be empty if no data found) | |
| python -Im coverage html --skip-covered --skip-empty || true | |
| python -Im coverage report --format=markdown >> "$GITHUB_STEP_SUMMARY" || echo "No coverage data found." | |
| - name: Upload HTML report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: html-report | |
| path: htmlcov |