actually loading images now #23
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: Collect Test Data | |
| on: | |
| push: | |
| branches: [ '*' ] | |
| pull_request: | |
| branches: [ '*' ] | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| collect-data: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| cache-hit: ${{ steps.test-data-cache.outputs.cache-hit }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true # Ensure we get the submodule info | |
| - name: Cache test data | |
| uses: actions/cache@v4 | |
| id: test-data-cache | |
| with: | |
| path: test/test_data | |
| key: test-data-${{ hashFiles('.gitmodules') }} | |
| restore-keys: | | |
| test-data- | |
| - name: Get and process test data | |
| if: steps.test-data-cache.outputs.cache-hit != 'true' | |
| id: get-test-data | |
| run: make get-test-data | |
| - name: Calculate test data hash | |
| id: test-data-hash | |
| run: | | |
| # Create a hash of all the test data files | |
| find test/test_data -type f -exec sha256sum {} \; | sort | sha256sum | cut -d' ' -f1 > test_data_hash.txt | |
| echo "hash=$(cat test_data_hash.txt)" >> $GITHUB_OUTPUT | |
| - name: Verify test data | |
| run: | | |
| if [ ! -d "test/test_data" ]; then | |
| echo "Test data directory not found" | |
| exit 1 | |
| fi | |
| if [ ! -d "test/test_data/mixed_dicoms" ]; then | |
| echo "Mixed DICOM directory not found" | |
| exit 1 | |
| fi | |
| - name: Upload test data | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-data | |
| path: test/test_data |