GH Actions CI #87
This file contains 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: GH Actions CI | |
on: | |
# run every Sunday at 3:53 UTC | |
schedule: | |
- cron: "53 3 * * 0" | |
push: | |
branches: | |
- "master" | |
pull_request: | |
branches: | |
- "master" | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
unittests: | |
name: Test ${{ matrix.os }} with Python ${{ matrix.python-version }} | |
if: github.repository == 'MDAnalysis/MDAnalysisData' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
include: | |
- os: macOS-latest | |
python-version: "3.9" | |
- os: macOS-latest | |
python-version: "3.12" | |
- os: windows-latest | |
python-version: "3.9" | |
- os: windows-latest | |
python-version: "3.12" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install testing dependencies (pytest, pytest plugins) | |
run: | | |
python -m pip install wheel | |
python -m pip install pytest pytest-cov pytest-pep8 pytest-mock codecov | |
- name: Install package dependencies | |
run: | | |
python -m pip install six setuptools tqdm | |
- name: Install package | |
run: | | |
python -m pip install -e . | |
- name: Run tests | |
run: | | |
pytest -v --cov=MDAnalysisData --cov-report=xml --color=yes MDAnalysisData/tests | |
- name: Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
fail_ci_if_error: True | |
verbose: True |