Skip to content

Corrected ubuntu-20-04 to ubuntu-20.04 #28

Corrected ubuntu-20-04 to ubuntu-20.04

Corrected ubuntu-20-04 to ubuntu-20.04 #28

Workflow file for this run

name: CI
on:
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming
# The cookiecutter uses the "--initial-branch" flag when it runs git-init
push:
branches:
- "main"
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"
workflow_dispatch:
jobs:
test:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, ubuntu-latest] #, windows-latest] # AmberTools is not currently installable on Windows
python-version: ["3.11"] #, "3.12"] # intend to support more recent Python version eventually, but tooling is built around 3.11 only for now
fail-fast: false
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/setup-micromamba
- uses: mamba-org/setup-micromamba@v1
with:
generate-run-shell: false # recommended fix to weird ENOENT error (https://github.com/mamba-org/setup-micromamba/issues/130)
environment-file: devtools/conda-envs/test-env.yml
environment-name: test
condarc: |
channels:
- conda-forge
- defaults
create-args: >-
python=${{ matrix.python-version }}
- 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=polymerist --cov-report=xml --color=yes polymerist/tests/
- name: CodeCov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}