Release 0.9.6 #414
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: PyTest | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| paths: | |
| - src/sparkle/** | |
| jobs: | |
| pytest: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| max-parallel: 5 | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| services: # Required for Slurm cluster | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ROOT_PASSWORD: root | |
| ports: | |
| - "8888:3306" | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: ./.github/actions/setup_slurm_action # Set up medium slurm cluster | |
| - uses: r-lib/actions/setup-r@v2 | |
| - name: Set up Python version | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: '${{ matrix.python-version }}' | |
| - name: Install dependencies | |
| run: | | |
| python3 -m venv venv/ | |
| source venv/bin/activate # Activate the new environment | |
| pip install -e .[dev] # Install Sparkle from the repo with dev dependencies | |
| - name: Install RunSolver dependencies | |
| run: | | |
| sudo apt-get install libnuma-dev | |
| sudo apt-get install numactl | |
| - name: Install pdflatex for report generation dependency | |
| run: sudo apt-get install texlive-latex-base | |
| - name: Run Unittest | |
| run: | | |
| source venv/bin/activate # Activate venv | |
| pytest --all | |
| - name: Archive outputs | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: output | |
| path: Output/ | |
| retention-days: 5 |