Skip to content

Commit

Permalink
Merge pull request #17 from timbernat/CI-updates-move
Browse files Browse the repository at this point in the history
Ci updates move
  • Loading branch information
timbernat authored Aug 13, 2024
2 parents 0228ac6 + 849291b commit ff3b7b1
Showing 1 changed file with 36 additions and 9 deletions.
45 changes: 36 additions & 9 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,64 @@ jobs:
strategy:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
python-version: [3.8, 3.9, "3.10"]
python-version: ["3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
{% if cookiecutter.dependency_source == 'Dependencies from pip only (no conda)' %}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

# More info on options: https://github.com/marketplace/actions/provision-with-micromamba
- uses: mamba-org/provision-with-micromamba@main
- name: Testing Dependencies
shell: bash
run: |
python -m pip install -U pytest pytest-cov codecov
{% else %}
# More info on options: https://github.com/marketplace/actions/setup-micromamba
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/test_env.yaml
environment-name: test
channels: conda-forge,defaults
extra-specs: |
{%- if cookiecutter.dependency_source == 'Prefer conda-forge with pip fallback' %}
condarc: |
channels:
- conda-forge
{%- elif cookiecutter.dependency_source == 'Prefer default anaconda channel with pip fallback' %}
condarc: |
channels:
- defaults
{%- endif %}
create-args: >-
python=${{ matrix.python-version }}
{% endif %}
- name: Install package
{%- if cookiecutter.dependency_source == 'Dependencies from pip only (no conda)' %}
shell: bash
run: |
python -m pip install .
{% else %}
# conda setup requires this special shell
shell: bash -l {0}
run: |
python -m pip install . --no-deps
micromamba list
{% endif %}
- name: Run tests
{%- if cookiecutter.dependency_source == 'Dependencies from pip only (no conda)' %}
shell: bash
{% else %}
# conda setup requires this special shell
shell: bash -l {0}
{%- endif %}
run: |
pytest -v --cov=polymerist --cov-report=xml --color=yes polymerist/tests/
Expand All @@ -61,4 +88,4 @@ jobs:
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}

0 comments on commit ff3b7b1

Please sign in to comment.