Update CI.yaml #50
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: CI | |
on: | |
workflow_dispatch: | |
branches: | |
- "debug_docs" | |
push: | |
branches: | |
- "main" | |
- "debug_docs" | |
pull_request: | |
branches: | |
- "main" | |
schedule: | |
# Weekly tests run on main by default: | |
# Scheduled workflows run on the latest commit on the default or base branch. | |
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule) | |
- cron: "0 0 * * 0" | |
jobs: | |
test: | |
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macOS-latest, ubuntu-latest, windows-latest] | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Additional info about the build | |
shell: bash | |
run: | | |
uname -a | |
df -h | |
ulimit -a | |
# More info on options: https://github.com/marketplace/actions/provision-with-micromamba | |
- uses: mamba-org/setup-micromamba@v2 | |
with: | |
environment-file: requirements.yaml | |
environment-name: generate_alchemical_lammps_inputs | |
init-shell: bash | |
cache-environment: true | |
post-cleanup: 'all' | |
channels: conda-forge,defaults | |
extra-specs: | | |
python=${{ matrix.python-version }} | |
create-args: >- | |
pytest | |
pytest-cov | |
codecov | |
- name: Install package | |
# conda setup requires this special shell | |
shell: bash -l {0} | |
run: | | |
python -m pip install . --no-deps | |
micromamba list | |
- name: Run tests | |
# conda setup requires this special shell | |
shell: bash -l {0} | |
run: | | |
pytest -v --cov=generate_alchemical_lammps_inputs --cov-report=xml --color=yes src/tests/ | |
- name: CodeCov | |
uses: codecov/codecov-action@v1 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} | |
docs: | |
name: Build docs on ubuntu-latest | |
runs-on: ubuntu-latest | |
steps: | |
- uses: usnistgov/Docs4NIST@0.7 | |
with: | |
docs-folder: docs/ | |
pip-requirements: docs/requirements.txt | |
formats: |- | |
epub | |
# - name: Setup upterm session | |
# uses: lhotari/action-upterm@v1 | |
# if: ${{ failure() }} | |
# with: | |
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow | |
# limit-access-to-actor: true | |
# ## limits ssh access and adds the ssh public keys of the listed GitHub users | |
# limit-access-to-users: guyer |