|
| 1 | +name: MDAnalysis Compatibility |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '0 8 * * 1' # Weekly Monday checks |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +jobs: |
| 9 | + mdanalysis-compatibility: |
| 10 | + name: MDAnalysis Compatibility Tests |
| 11 | + runs-on: ${{ matrix.os }} |
| 12 | + |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + os: [ubuntu-24.04, windows-2025, macos-15] |
| 16 | + python-version: ["3.11", "3.12", "3.13", "3.14"] |
| 17 | + mdanalysis-version: ["2.10.0"] |
| 18 | + |
| 19 | + steps: |
| 20 | + - name: Checkout repo |
| 21 | + uses: actions/checkout@v5.0.0 |
| 22 | + |
| 23 | + - name: Set up Python ${{ matrix.python-version }} |
| 24 | + uses: actions/setup-python@v6.0.0 |
| 25 | + with: |
| 26 | + python-version: ${{ matrix.python-version }} |
| 27 | + |
| 28 | + - name: Install dependencies with MDAnalysis ${{ matrix.mdanalysis-version }} |
| 29 | + run: | |
| 30 | + pip install --upgrade pip |
| 31 | + pip install -e .[testing] |
| 32 | +
|
| 33 | + if [ "${{ matrix.mdanalysis-version }}" = "latest" ]; then |
| 34 | + pip install MDAnalysis |
| 35 | + else |
| 36 | + pip install "MDAnalysis==${{ matrix.mdanalysis-version }}" |
| 37 | + fi |
| 38 | +
|
| 39 | + - name: Run compatibility tests |
| 40 | + run: pytest --cov CodeEntropy --cov-report=term-missing --cov-append |
| 41 | + |
| 42 | + - name: Create Issue on Failure |
| 43 | + if: failure() |
| 44 | + uses: JasonEtco/create-an-issue@v2 |
| 45 | + env: |
| 46 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 47 | + PYTHON_VERSION: ${{ matrix.python-version }} |
| 48 | + MDA_VERSION: ${{ matrix.mdanalysis-version }} |
| 49 | + RUN_NUMBER: ${{ github.run_number }} |
| 50 | + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
| 51 | + with: |
| 52 | + filename: .github/workflows/mdanalysis-compatibility-failure.md |
| 53 | + update_existing: true |
| 54 | + search_existing: open |
0 commit comments