test gh workflow on sct-pipeline/bavaria-quebec #1
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: Test SCT Installation | |
| on: | |
| push: | |
| branches: | |
| - nk/autoseg | |
| # release: | |
| # types: [published] | |
| jobs: | |
| run_dataset_download: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Python 3 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.9.16 | |
| # - name: Install dependencies | |
| # run: | | |
| # python -m pip install --upgrade pip | |
| # https://github.com/spinalcordtoolbox/spinalcordtoolbox/blob/master/.ci.sh | |
| - name: Install SCT | |
| run: | | |
| # source python/etc/profile.d/conda.sh >> $GITHUB_ENV | |
| git clone https://github.com/spinalcordtoolbox/spinalcordtoolbox.git | |
| cd spinalcordtoolbox | |
| ./.ci.sh -i | |
| # NB: install_sct edits ~/.bashrc, but those environment changes don't get passed to subsequent steps in GH Actions. | |
| # So, we filter through the .bashrc and pass the values to $GITHUB_ENV and $GITHUB_PATH. | |
| # Relevant documentation: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#environment-files | |
| cat ~/.bashrc | grep "export SCT_DIR" | cut -d " " -f 2 >> $GITHUB_ENV | |
| cat ~/.bashrc | grep "export PATH" | grep -o "/.*" | cut -d ':' -f 1 >> $GITHUB_PATH | |
| - name: Install git-annex | |
| uses: jstritch/setup-git-annex@v1 | |
| - name: Ensure git-annex runs | |
| run: | | |
| which git-annex | |
| git-annex version | |
| git annex help | |
| - name: Configure Git identity | |
| run: | | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "GitHub Actions" | |
| # - name: Run dataset setup script | |
| # shell: bash -l {0} # Ensures the Conda environment is properly loaded | |
| # run: | | |
| # chmod +x scripts/compute_morphometrics_spine_generic.sh | |
| # source scripts/compute_morphometrics_spine_generic.sh | |
| # - name: Run model script | |
| # run: ./scripts/run_model.sh |