-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9129e24
commit f6710d5
Showing
18 changed files
with
955 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
test: | ||
name: Unit tests | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r dev-requirements.txt | ||
- name: run tests | ||
run: python -m pytest tests/ | ||
|
||
deploy: | ||
name: Deploy to GitHub and PyPI | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: github.ref == 'refs/heads/master' && github.repository_owner == 'ladybug-tools' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: set up node # we need node for for semantic release | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 14.2.0 | ||
- name: install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r dev-requirements.txt | ||
- name: install semantic-release | ||
run: | ||
npm install @semantic-release/exec | ||
- name: run semantic release | ||
id: new_release | ||
run: | | ||
nextRelease="`npx semantic-release@^17.0.0 --dryRun | grep -oP 'Published release \K.*? ' || true`" | ||
npx semantic-release@^17.0.0 | ||
echo "::set-output name=tag::$nextRelease" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
|
||
docs: | ||
name: Generate docs | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: github.ref == 'refs/heads/master' && github.repository_owner == 'ladybug-tools' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: install dependencies | ||
run: | | ||
pip install -U . | ||
pip install -r dev-requirements.txt | ||
sphinx-apidoc -f -e -d 4 -o ./docs ./honeybee_idaice | ||
sphinx-build -b html ./docs ./docs/_build/docs | ||
- name: deploy to github pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
# this will use ladybugbot token | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: gh-pages | ||
publish_dir: docs/_build/ | ||
force_orphan: true | ||
keep_files: false | ||
full_commit_message: 'deploy: update docs' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: CI-On-Dispatch | ||
|
||
on: repository_dispatch | ||
|
||
jobs: | ||
|
||
bump_honeybee_core: | ||
name: "Check Event" | ||
runs-on: ubuntu-latest | ||
if: github.event.action == 'honeybee_core_release' | ||
steps: | ||
- name: "Checkout Master Branch" | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: refs/heads/master | ||
token: ${{ secrets.DEPS_UPDATING }} | ||
- name: "Run Update Script" | ||
env: | ||
VERSION: ${{ github.event.client_payload.version }} | ||
run: | | ||
export CLEAN_VERSION=$(echo $VERSION | sed 's/v//g') | ||
sed -i --regexp-extended 's/(honeybee-core==).*/honeybee-core=='"$CLEAN_VERSION"'/' requirements.txt | ||
- name: "Commit and Push Changes" | ||
id: push | ||
env: | ||
VERSION: ${{ github.event.client_payload.version }} | ||
run: | | ||
git config --global user.name 'ladybugbot' | ||
git config --global user.email '[email protected]' | ||
git add . | ||
git commit -m "fix(deps): Bump honeybee-core to $VERSION" | ||
git push |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
assets/ | ||
sample_models/ | ||
*.pyc | ||
test.py | ||
*.gh | ||
|
@@ -16,4 +16,4 @@ dist | |
venv | ||
/.cache | ||
/.vscode | ||
|
||
/tests/assets/temp/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/github", | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"publishCmd": "bash deploy.sh" | ||
} | ||
] | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Contributor Covenant Code of Conduct | ||
========================================= | ||
|
||
This project follows Ladybug Tools contributor covenant code of conduct. See our [contributor covenant code of conduct](https://github.com/ladybug-tools/contributing/blob/master/CODE-OF-CONDUCT.md). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Contributing | ||
------------ | ||
We welcome contributions from anyone, even if you are new to open source we will be happy to help you to get started. Most of the Ladybug Tools developers started learning programming through developing for Ladybug Tools. | ||
|
||
### Code contribution | ||
This project follows Ladybug Tools contributing guideline. See [contributing to Ladybug Tools projects](https://github.com/ladybug-tools/contributing/blob/master/README.md). |
Oops, something went wrong.