Merge pull request #78 from falconstryker/devel #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: MarsPull Test Workflow | |
| on: | |
| # Trigger the workflow on push to devel branch | |
| push: | |
| branches: [ devel ] | |
| paths: | |
| - 'bin/MarsPull.py' | |
| - 'tests/test_marspull.py' | |
| - '.github/workflows/marspull_test.yml' | |
| # Allow manual triggering of the workflow | |
| workflow_dispatch: | |
| # Trigger on pull requests that modify MarsPull or tests | |
| pull_request: | |
| branches: [ devel ] | |
| paths: | |
| - 'bin/MarsPull.py' | |
| - 'tests/test_marspull.py' | |
| - '.github/workflows/marspull_test.yml' | |
| jobs: | |
| test: | |
| # Run on multiple OS and Python versions for comprehensive testing | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-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 | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install requests 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 MarsPull tests | |
| run: | | |
| python -m unittest tests/test_marspull.py |