Skip to content

Commit

Permalink
Merge pull request #32 from molssi-seamm/conda-forge
Browse files Browse the repository at this point in the history
Internal Release for conda-forge build
  • Loading branch information
seamm authored May 6, 2021
2 parents 116e9fa + e45b7e8 commit bc67717
Show file tree
Hide file tree
Showing 32 changed files with 1,633 additions and 1,938 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/BranchCI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: BranchCI

on:
push:
branches-ignore:
- 'main'

jobs:
light-ci:
name: Lint ubuntu-latest Py3.8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
# More info on options: https://github.com/conda-incubator/setup-miniconda
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.8
environment-file: devtools/conda-envs/test_env.yaml
activate-environment: test
auto-update-conda: false
auto-activate-base: false
show-channel-urls: true
- name: Install package
# conda setup requires this special shell
shell: bash -l {0}
run: |
python -m pip install . --no-deps
conda list
- name: Run linters
shell: bash -l {0}
run: |
black --check --diff seamm_ff_util tests
flake8 seamm_ff_util tests
- name: Run tests
shell: bash -l {0}
run: |
pytest -v --cov=seamm_ff_util --cov-report=xml --color=yes tests/
- name: CodeCov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
name: codecov-ubuntu-latest-py3.8

103 changes: 9 additions & 94 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -1,77 +1,54 @@
name: CI

on:
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming
# Existing codes likely still have "master" as the primary branch
# Both are tracked here to keep legacy and new codes working
push:
branches:
- "master"
- "main"
pull_request:
branches:
- "master"
- "main"
release:
types: [published]
branches:
- "master"
- "main"
schedule:
# Run on master by default Sunday morning at 3:30:
# Run by default Sunday morning at 3:30:
# 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: "30 3 * * 0"

jobs:
lint:
name: Lint ${{ matrix.os }} Py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]

name: Lint ubuntu-latest Py3.8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

with:
# This gets all branches (1 = only current branch)
fetch-depth: 0
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
# More info on options: https://github.com/conda-incubator/setup-miniconda
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
python-version: 3.8
environment-file: devtools/conda-envs/test_env.yaml

# channels: conda-forge,defaults

activate-environment: test
auto-update-conda: false
auto-activate-base: false
show-channel-urls: true

- name: Install package

# conda setup requires this special shell
shell: bash -l {0}
run: |
python -m pip install . --no-deps
conda list
- name: Run linters

# conda setup requires this special shell
shell: bash -l {0}

run: |
black --check --diff seamm_ff_util tests
flake8 seamm_ff_util tests
yapf --diff --recursive seamm_ff_util tests
test:
name: Test ${{ matrix.os }} Py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
Expand All @@ -80,19 +57,14 @@ jobs:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
python-version: [3.7, 3.8]

steps:
- uses: actions/checkout@v1

- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
# More info on options: https://github.com/conda-incubator/setup-miniconda
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -101,75 +73,18 @@ jobs:
auto-update-conda: false
auto-activate-base: false
show-channel-urls: true

- name: Install package

# conda setup requires this special shell
shell: bash -l {0}
run: |
python -m pip install . --no-deps
conda list
- name: Run tests

# conda setup requires this special shell
shell: bash -l {0}

run: |
pytest -v --cov=seamm_ff_util --cov-report=xml --color=yes tests/
- name: CodeCov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}

deploy:
name: PyPi ${{ matrix.os }} Py${{ matrix.python-version }}
# Run only for tagged releases.
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
runs-on: ${{ matrix.os }}
needs: [lint, test]
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]

steps:
- uses: actions/checkout@v1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install package

# conda setup requires this special shell
shell: bash -l {0}
run: |
python -m pip install . --no-deps
conda list
- name: Install pypa/build
run: |
python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: |
python -m build --sdist --wheel --outdir dist/
ls -l dist/
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}
117 changes: 117 additions & 0 deletions .github/workflows/Release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Release

on:
release:
types: [published]
branches:
- "main"

jobs:
lint:
name: Lint ubuntu-latest Py3.8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
# More info on options: https://github.com/conda-incubator/setup-miniconda
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.8
environment-file: devtools/conda-envs/test_env.yaml
activate-environment: test
auto-update-conda: false
auto-activate-base: false
show-channel-urls: true
- name: Install package
# conda setup requires this special shell
shell: bash -l {0}
run: |
python -m pip install . --no-deps
conda list
- name: Run linters
shell: bash -l {0}
run: |
black --check --diff seamm_ff_util tests
flake8 seamm_ff_util tests
test:
name: Test ${{ matrix.os }} Py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
needs: lint
strategy:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
python-version: [3.7, 3.8]
steps:
- uses: actions/checkout@v1
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
environment-file: devtools/conda-envs/test_env.yaml
activate-environment: test
auto-update-conda: false
auto-activate-base: false
show-channel-urls: true
- name: Install package
shell: bash -l {0}
run: |
python -m pip install . --no-deps
conda list
- name: Run tests
shell: bash -l {0}
run: |
pytest -v --cov=seamm_ff_util --cov-report=xml --color=yes tests/
- name: CodeCov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}

deploy:
name: PyPi ubuntu-latest Py3.8
# Run only for tagged releases publishing development or release candidates
# only to test.pypi, otherwise to both it and the main pypi.
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install package
shell: bash -l {0}
run: |
python -m pip install . --no-deps
conda list
- name: Install pypa/build
run: |
python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: |
python -m build --sdist --wheel --outdir dist/
ls -l dist/
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: Publish distribution 📦 to PyPI
if: contains(github.ref, 'dev') == false && contains(github.ref, 'rc') == false
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}
21 changes: 0 additions & 21 deletions .readthedocs.yml

This file was deleted.

Loading

0 comments on commit bc67717

Please sign in to comment.