CI: Run tests on larger datasets #82
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: httomolibgpu tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| iris-gpu: | |
| runs-on: iris-gpu | |
| container: | |
| image: nvidia/cuda:12.6.3-devel-ubi8 | |
| env: | |
| NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: Checkout repository code | |
| uses: actions/checkout@v4 | |
| - name: Create conda environment | |
| uses: mamba-org/setup-micromamba@v1 | |
| with: | |
| environment-file: conda/environment.yml | |
| environment-name: httomo | |
| post-cleanup: 'all' | |
| init-shell: bash | |
| - name: Download test data from Zenodo | |
| run: | | |
| # Install required tools | |
| dnf install -y epel-release | |
| dnf install -y curl jq | |
| # Create a directory to store test data | |
| mkdir -p tests/large_data_archive | |
| cd tests/large_data_archive | |
| # Download and process all files from Zenodo | |
| echo "Fetching files from Zenodo record 14338424..." | |
| curl -s "https://zenodo.org/api/records/14338424" | \ | |
| jq -r '.files.entries[] | [.key, .links.content, .checksum] | @tsv' | \ | |
| while IFS=$'\t' read -r filename url checksum; do | |
| echo "Downloading ${filename}..." | |
| curl -L -o "${filename}" "${url}" | |
| # Extract MD5 from checksum string (removes 'md5:' prefix) | |
| expected_md5=${checksum#md5:} | |
| actual_md5=$(md5sum "${filename}" | cut -d' ' -f1) | |
| if [ "${actual_md5}" = "${expected_md5}" ]; then | |
| echo "✓ Verified ${filename}" | |
| else | |
| echo "✗ Checksum verification failed for ${filename}" | |
| echo "Expected: ${expected_md5}" | |
| echo "Got: ${actual_md5}" | |
| exit 1 | |
| fi | |
| done | |
| # Show downloaded files | |
| echo -e "\nDownloaded files:" | |
| ls -lh | |
| cd ../.. | |
| - name: Install httomolibgpu | |
| run: | | |
| pip install .[dev] | |
| micromamba list | |
| - name: Run tests | |
| run: | | |
| pytest tests/ |