Skip to content

Commit

Permalink
Merge 0ef0629 into 7fd66b3
Browse files Browse the repository at this point in the history
  • Loading branch information
chebroluharika committed Jul 26, 2021
2 parents 7fd66b3 + 0ef0629 commit fad307d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 16 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/dockerimage.yml → .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,44 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
keep_history: true
build_dir: docs/build/html/.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build and publish to PyPi
env:
TWINE_USERNAME: ${{ secrets.pypi_username }}
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Setup environment for Docker image publish
run: |
echo "GITHUB_REF=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: Login to Docker Hub
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin

- name: Build the tagged Docker image
run: docker build . --file Dockerfile --tag hewlettpackardenterprise/hpe-oneview-sdk-for-python:${{ env.GITHUB_REF }}-OV6.2

- name: Push the tagged Docker image
run: docker push hewlettpackardenterprise/hpe-oneview-sdk-for-python:${{ env.GITHUB_REF }}-OV6.2
48 changes: 33 additions & 15 deletions .github/workflows/run_tests.yml → .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: python CI

on:
- pull_request
on: [push, pull_request]

jobs:
tox_test:
Expand All @@ -25,7 +24,12 @@ jobs:
python -m pip install --upgrade pip
pip install tox
- name: Run tox tests
# - name: Analysing the code with pylint
# run: |
# pip install pylint
# pylint $(git ls-files '*.py')

- name: Run unit tests using tox
run: tox

Build_and_publish:
Expand All @@ -49,22 +53,36 @@ jobs:
python -m pip install --upgrade pip
pip install tox
- name: Run tox tests
run: tox
# - name: Analysing the code with pylint
# run: |
# pip install pylint
# pylint $(git ls-files '*.py')

- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
- name: Send mail notifier about status of pipeline
uses: dawidd6/action-send-mail@v2
with:
target_branch: gh-pages
keep_history: true
build_dir: docs/build/html/.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
server_address: smtp-mail.outlook.com
server_port: 587
username: ${{secrets.MAIL_USERNAME}}
password: ${{secrets.MAIL_PASSWORD}}
subject: OneViewSDK Daily Deployment Results – ${{job.status}}
body: |
Hi All,
OneViewSDK daily deployment on build 6.30.00 is considered a ${{job.status}} for Synergy Composer and VM appliances.
link: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
Thanks,
OneView SDK Deployment Automation
to: bala-sai-harika.chebrolu@hpe.com
from: github-actions
priority: high

- name: Run unit tests using tox
run: tox

- name: coveralls
- name: Check coverage
uses: AndreMiras/coveralls-python-action@develop
with:
github-token: ${{ secrets.COVERALLS_TOKEN }}
flag-name: 'Unit Test'
debug: true
debug: true

0 comments on commit fad307d

Please sign in to comment.