Merge pull request #442 from xiachen-rh/cloudinit #1467
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
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | |
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on | |
# https://github.com/marketplace/actions/google-chat-notification | |
name: Build test and publish | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build wheel and publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: Install and upgrade pip and wheel | |
run: | | |
python -m pip install -U pip wheel --user | |
- name: Install setuptools | |
run: | | |
python -m pip install -U setuptools --user | |
- name: Build a binary wheel and a source tarball | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Install the wheel | |
run: | | |
pip install -U dist/*.whl | |
os-tests -p test_check_locale | |
- name: Run simple cases to test | |
run: | | |
os-tests -p test_check_locale | |
cat /tmp/os_tests_result/attachments/TestGeneralCheck.os_tests.tests.test_general_check.TestGeneralCheck.test_check_locale/os_tests.tests.test_general_check.TestGeneralCheck.test_check_locale.debug | |
- name: Publish to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.pypi_token }} | |
- name: Google Chat Notification | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
uses: Co-qn/google-chat-notification@releases/v1 | |
with: | |
name: ${{ github.event.head_commit.message }} | |
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_OS_TESTS }} | |
status: ${{ job.status }} | |