Test install_isis.sh #48
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 install_isis.sh | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| paths: | |
| - 'isis/scripts/install_isis.sh' | |
| - '.github/workflows/install_isis_test.yml' | |
| pull_request: | |
| branches: | |
| - dev | |
| paths: | |
| - 'isis/scripts/install_isis.sh' | |
| - '.github/workflows/install_isis_test.yml' | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 5 * * 0' # 10:00 PM MST Monday (UTC: Sunday 5:00 AM) | |
| jobs: | |
| test-install-isis: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-14] | |
| test_case: | |
| - lts | |
| - dev | |
| - main | |
| steps: | |
| # - name: Skip odd weeks | |
| # run: | | |
| # WEEK_NUM=$(date +%V) | |
| # if (( WEEK_NUM % 2 != 0 )); then | |
| # echo "Skipping this week ($WEEK_NUM is odd)." | |
| # exit 0 | |
| # fi | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Make install_isis.sh executable | |
| run: chmod +x ./isis/scripts/install_isis.sh | |
| - name: Run install_isis.sh with test case | |
| run: | | |
| mkdir -p /tmp/isis_test_prefix | |
| set -e | |
| case "${{ matrix.test_case }}" in | |
| lts) | |
| echo "Running install_isis.sh with LTS environment" | |
| bash ./isis/scripts/install_isis.sh -l lts -v latest -n auto --no-data --install-prefix /tmp/isis_test_prefix | |
| ;; | |
| dev) | |
| echo "Running install_isis.sh with dev environment" | |
| EXPECTED_ENV_NAME="isis-dev" | |
| bash ./isis/scripts/install_isis.sh -l dev -v latest --no-data -n $EXPECTED_ENV_NAME --install-prefix /tmp/isis_test_prefix | |
| ;; | |
| main) | |
| echo "Running install_isis.sh with main environment" | |
| bash ./isis/scripts/install_isis.sh -l main -v latest -n auto --install-prefix /tmp/isis_test_prefix | |
| ;; | |
| *) | |
| echo "Unknown test case" | |
| exit 1 | |
| ;; | |
| esac | |
| - name: Check ISIS installation | |
| run: | | |
| echo "Checking ISIS installation at /tmp/isis_test_prefix/" | |
| ls /tmp/isis_test_prefix/ | |
| source ~/.bashrc | |
| ISIS_ENV_PATH=$(find /tmp/isis_test_prefix -mindepth 1 -maxdepth 1 -type d | head -n 1) | |
| export ISISROOT=$ISIS_ENV_PATH | |
| $ISIS_ENV_PATH/bin/spiceinit -H | |
| echo "ISIS installation check passed." | |