Skip to content

Update GitHub Actions #454

Update GitHub Actions

Update GitHub Actions #454

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '0 8 * * 1-5'
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python: [3.13]
aiida: [2.9.0, 2.9.1]
ambertools: [24]
continue-on-error: false
timeout-minutes: 30
name: py${{ matrix.python }}-aiida${{ matrix.aiida }}
defaults:
run:
shell: bash -el {0}
steps:
- name: checkout
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1
with:
activate-environment: "testing"
python-version: ${{ matrix.python }}
channels: "conda-forge"
auto-activate-base: false
- name: Install dependencies
run: |
conda install -c conda-forge python=${{ matrix.python }} aiida-core=${{ matrix.aiida }} ambertools=${{ matrix.ambertools }}
- name: Install aiida-amber to test
run: |
pip install -e .[testing]
- name: Run tests
run: |
pytest -s --cov aiida_amber --cov-report term-missing --cov-report "xml:${GITHUB_WORKSPACE}/coverage.xml" --cov-append .
- name: Report Coverage
uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8
with:
file: ${{ github.workspace }}/coverage.xml
format: cobertura
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@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8
with:
parallel-finished: true
docs:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- name: Set up Python 3.13
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: 3.14
- 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@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- name: Set up Python 3.13
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: 3.14
- 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 )