This directory contains GitHub Actions workflows that run various actions (tests, checks, docker builds, documentation, code coverage assessment) on the repository. These workflows are run whenever new code is added to the repository, either upon push to a fork of svMultiPhysics, or upon a pull request to SimVascular/svMultiPhysics. Upon pull request, these actions must succeed for pull request to be merged.
Purpose: Runs comprehensive integration tests on both Ubuntu and macOS platforms when relevant code changes are detected. The integration tests can be found in the tests/ directory and use pytest.
Triggers:
- Pull requests
- Pushes to any branch
Key Features:
- Smart Change Detection: Only runs full test suite when changes are made to important directories (
Code/,tests/,.github/) - Multi-Platform Testing: Runs tests on both Ubuntu (using Docker container) and macOS
- Coverage Reporting: Generates and uploads code coverage reports to Codecov
Jobs:
check-for-changes: Determines if full test suite should run based on file changes in important directories. Usesdorny/paths-filter@v3to filter directories.test-ubuntu: Runs tests in Ubuntu environment throughactions/test-ubuntu/action.yml. Triggered only ifcheck-for-changesreturnsrun_full_tests = truetest-macos: Runs tests on macOS throughactions/test-macos/action.yml. Triggered only ifcheck-for-changesreturnsrun_full_tests = trueall-tests: Coordinates test results for branch protection rules. Iftest-ubuntuandtest-macosrun, returns success status only if bothtest-ubuntuandtest-macosreturn success. Iftest-ubuntuandtest-macosare skipped, always returns success. This test must pass for a pull request to be merged, as set by branch protection rules.
Purpose: Builds and publishes Docker images for the solver component.
Triggers:
- Pushes to the
mainbranch
Process:
- Sets up QEMU and Docker Buildx for multi-platform builds
- Authenticates with DockerHub using stored credentials
- Builds the Docker image using
Docker/solver/dockerfile - Pushes the image to
simvascular/solver:latest
Purpose: Builds and deploys HTML documentation using Doxygen.
Triggers:
- All pushes and pull requests
Process:
- Installs Doxygen
- Generates documentation from
Documentation/Doxyfile - Uploads documentation as an artifact
- Deploys documentation to GitHub Pages (only for
mainbranch)
Purpose: Ensures all source files contain proper copyright headers.
Triggers:
- All pushes and pull requests
Process:
- Uses
kt3k/license_checkerto verify copyright headers in.hand.cppfiles - Fails the workflow if any files are missing proper copyright notices
Purpose: Comprehensive integration testing on Ubuntu with code coverage.
Environment: Uses simvascular/libraries:ubuntu22 Docker container
Steps:
- Build svZeroDSolver: Clones and builds the ZeroD solver dependency
- Build svMultiPhysics (Trilinos): Builds with Trilinos support, coverage, and unit tests enabled
- Build svMultiPhysics (PETSc): Builds with PETSc support as an alternative
- Run Integration Tests: Executes pytest tests in the
tests/directory - Run Unit Tests: Executes CTest unit tests
- Generate Coverage: Creates coverage reports
- Upload Coverage: Sends coverage data to Codecov
Purpose: Comprehensive testing on macOS with native dependencies.
Steps:
- Install Dependencies: Uses Homebrew to install GCC, VTK, OpenBLAS, LAPACK, Mesa, OpenMPI, Qt, and lcov
- Install Miniconda: Sets up Python environment
- Build svZeroDSolver: Clones and builds the ZeroD solver
- Build svMultiPhysics: Builds with coverage and unit tests enabled
- Install Test Dependencies: Creates conda environment with Python testing libraries
- Run Integration Tests: Executes pytest tests
- Run Unit Tests: Executes CTest unit tests
Configures code coverage reporting with Codecov:
- Sets coverage status to "informational" for both project and patch coverage
- This means coverage reports won't block PRs but provide visibility into test coverage
- Making Changes: When you push changes or create a pull request, the workflows will automatically run
- Test Requirements: Ensure your changes don't break existing tests
- Copyright: Make sure all new
.hand.cppfiles include proper copyright headers - Documentation: Update documentation if you add new features
- Branch Protection: Branch protection rules require successes from the following checks in order for a pull request to be merged.
- "check-license-lines" in
copyright.yml - "documentation" in
documentation.yml - "All Tests" in
tests.yml
- "check-license-lines" in
- Docker Releases: Docker images are automatically built and pushed when changes are merged to
main - Documentation: Documentation is automatically deployed to GitHub Pages from the
mainbranch
The workflows require the following secrets to be configured in the repository settings:
CODECOV_TOKEN: Token for uploading coverage reports to CodecovDOCKER_PASSWORD: Password for DockerHub authenticationGITHUB_TOKEN: Automatically provided by GitHub for documentation deployment