1+ name : CodeEntropy CI
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ schedule :
8+ - cron : ' 0 8 * * 1'
9+
10+ jobs :
11+ tests :
12+ runs-on : ubuntu-latest
13+ timeout-minutes : 30
14+ strategy :
15+ matrix :
16+ python-version : ["3.11", "3.12", "3.13"]
17+ name : Run tests
18+ steps :
19+ - name : Checkout repo
20+ uses : actions/checkout@v4
21+
22+ - name : Set up Python ${{ matrix.python-version }}
23+ uses : actions/setup-python@v5
24+ with :
25+ python-version : ${{ matrix.python-version }}
26+
27+ - name : Install CodeEntropy and its testing dependencies
28+ run : pip install -e .[testing]
29+
30+ - name : Run test suite
31+ run : pytest --cov CodeEntropy --cov-report term-missing --cov-append .
32+
33+ - name : Coveralls GitHub Action
34+ uses : coverallsapp/github-action@v2.3.6
35+ with :
36+ github-token : ${{ secrets.COVERALLS_REPO_TOKEN }}
37+
38+ docs :
39+ runs-on : ubuntu-latest
40+ timeout-minutes : 15
41+ steps :
42+ - uses : actions/checkout@v4
43+ - name : Set up Python 3.12
44+ uses : actions/setup-python@v5
45+ with :
46+ python-version : 3.12
47+ - name : Install python dependencies
48+ run : |
49+ pip install --upgrade pip
50+ pip install -e .[docs]
51+ - name : Build docs
52+ run : cd docs && make
53+
54+ pre-commit :
55+ runs-on : ubuntu-latest
56+ timeout-minutes : 15
57+ steps :
58+ - uses : actions/checkout@v4
59+ - name : Set up Python 3.11
60+ uses : actions/setup-python@v5
61+ with :
62+ python-version : 3.11
63+ - name : Install python dependencies
64+ run : |
65+ pip install --upgrade pip
66+ pip install -e .[pre-commit,docs,testing]
67+ - name : Run pre-commit
68+ run : |
69+ pre-commit install
70+ pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
71+
72+ mdanalysis-compatibility :
73+ if : github.event_name == 'schedule'
74+ runs-on : ubuntu-latest
75+ timeout-minutes : 15
76+ strategy :
77+ matrix :
78+ python-version : ["3.11", "3.12", "3.13"]
79+ mdanalysis-version : ["2.7.0", "2.8.0", "2.9.0", "latest"]
80+ name : MDAnalysis Compatibility Tests
81+ steps :
82+ - name : Checkout repo
83+ uses : actions/checkout@v4
84+
85+ - name : Set up Python ${{ matrix.python-version }}
86+ uses : actions/setup-python@v5
87+ with :
88+ python-version : ${{ matrix.python-version }}
89+
90+ - name : Install dependencies with MDAnalysis ${{ matrix.mdanalysis-version }}
91+ run : |
92+ pip install --upgrade pip
93+ pip install -e .[testing]
94+ if [ "${{ matrix.mdanalysis-version }}" = "latest" ]; then
95+ pip install MDAnalysis
96+ else
97+ pip install "MDAnalysis==${{ matrix.mdanalysis-version }}"
98+ fi
99+
100+ - name : Run compatibility tests
101+ run : pytest --cov CodeEntropy --cov-report=term-missing --cov-append
102+
103+ - name : Create Issue on Failure
104+ if : failure()
105+ uses : JasonEtco/create-an-issue@v2
106+ env :
107+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
108+ PYTHON_VERSION : ${{ matrix.python-version }}
109+ MDA_VERSION : ${{ matrix.mdanalysis-version }}
110+ RUN_NUMBER : ${{ github.run_number }}
111+ RUN_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
112+ with :
113+ filename : .github/mdanalysis-compatibility-failure.md
114+ update_existing : true
115+ search_existing : open
0 commit comments