ci #618
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: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| schedule: | |
| - cron: '0 8 * * 1-5' | |
| workflow_dispatch: | |
| jobs: | |
| tests: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: [3.11] | |
| aiida: [2.6.1, 2.6.2, 2.6.3] | |
| container: [2026-01-26-gromacs2025.4-plumed2.9.2] | |
| continue-on-error: false | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| container: | |
| image: ghcr.io/ccpbiosim/aiida-gromacs-testenv:${{ matrix.container }} | |
| name: py${{ matrix.python }}-aiida${{ matrix.aiida }}-${{ matrix.container }} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6.0.1 | |
| - name: Add mamba packages | |
| shell: bash | |
| run: | | |
| mamba install -c conda-forge mamba python=${{ matrix.python }} aiida-core=${{ matrix.aiida }} aiida-core.services=${{ matrix.aiida }} | |
| - name: Start AiiDA with a test profile | |
| shell: bash | |
| run: | | |
| rabbitmq-server -detached | |
| sleep 5 | |
| verdi presto | |
| verdi status | |
| - name: Install aiida-gromacs and its testing dependencies | |
| shell: bash | |
| run: pip install -e .[testing] | |
| - name: Run test suite | |
| shell: bash | |
| run: pytest --cov aiida_gromacs --cov-report term-missing --cov-append . | |
| - name: Report Coverage | |
| uses: coverallsapp/github-action@v2.3.7 | |
| with: | |
| flag-name: run-${{ join(matrix.*, '-') }} | |
| parallel: true | |
| finish: | |
| needs: tests | |
| if: ${{ always() }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Coveralls Finished | |
| uses: coverallsapp/github-action@v2.3.7 | |
| with: | |
| parallel-finished: true | |
| docs: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v6.0.1 | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v6.2.0 | |
| with: | |
| python-version: 3.13 | |
| - name: Install python dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -e .[docs] | |
| - name: Build docs | |
| run: cd docs && make | |
| pre-commit: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v6.0.1 | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v6.2.0 | |
| with: | |
| python-version: 3.13 | |
| - name: Install python dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -e .[pre-commit] | |
| - name: Run pre-commit | |
| run: | | |
| pre-commit install | |
| pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) |