merging devel to Main 01/13/2026 #44
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: MarsCalendar Test Workflow | |
| # Cancel any in-progress job or previous runs | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| # Trigger the workflow on push to devel branch | |
| push: | |
| branches: [ devel, main ] | |
| paths: | |
| - 'bin/MarsCalendar.py' | |
| - 'tests/test_marscalendar.py' | |
| - '.github/workflows/marscalendar_test.yml' | |
| # Allow manual triggering of the workflow | |
| workflow_dispatch: | |
| # Trigger on pull requests that modify MarsCalendar or tests | |
| pull_request: | |
| branches: [ devel, main ] | |
| paths: | |
| - 'bin/MarsCalendar.py' | |
| - 'tests/test_marscalendar.py' | |
| - '.github/workflows/marscalendar_test.yml' | |
| # - 'AmesCAP/amescap/Script_utils.py' | |
| # - 'AmesCAP/amescap/Ncdf_wrapper.py' | |
| # - 'AmesCAP/amescap/FV3_utils.py' | |
| # - 'AmesCAP/amescap/Spectral_utils.py' | |
| jobs: | |
| test: | |
| # Run on multiple OS and Python versions for comprehensive testing | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ['3.9', '3.10', '3.11'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| # Checkout the repository | |
| - uses: actions/checkout@v3 | |
| # Set up the specified Python version | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # Install dependencies | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install numpy | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| # Install the package in editable mode | |
| - name: Install package | |
| run: pip install -e . | |
| # Run the tests | |
| - name: Run MarsCalendar tests | |
| run: | | |
| cd tests | |
| python -m unittest -v test_marscalendar.py |