Merge pull request #211 from CU-ESIIL/codex/fix-module-compatibility-… #496
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: Tests | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run unit tests (offline) | |
| run: | | |
| pytest -m "not integration and not online" --maxfail=1 --disable-warnings -q | |
| - name: Run integration tests (optional) | |
| if: env.RUN_INTEGRATION == '1' && matrix.python-version == '3.11' | |
| run: | | |
| pytest -m "integration" | |
| package: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Build distribution artifacts | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[test]" | |
| python -m build | |
| python -m twine check dist/* | |
| - name: Install built wheel in clean environment | |
| run: | | |
| python -m venv .pkg-venv | |
| .pkg-venv/bin/pip install --upgrade pip | |
| .pkg-venv/bin/pip install dist/*.whl | |
| .pkg-venv/bin/python -c "import cubedynamics; import cubedynamics.verbs; print(cubedynamics.__version__)" | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[docs]" | |
| - name: Build docs | |
| run: | | |
| mkdocs build --strict |