FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore: migrate to GitHub Actions by JenniferMah · Pull Request #107 · sendgrid/smtpapi-python · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) .rst  (1) .yml  (4) No extension  (1) All 4 file types selected
Only manifest files
Deleted files Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
28 changes: 0 additions & 28 deletions .codeclimate.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/release.yml
This file contains hidden or 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,50 @@
name: Publish Python distributions
on:
push:
tags:
- '*'
workflow_dispatch:

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout sendgrid-python-smtpapi
uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
Comment thread
eshanholtz marked this conversation as resolved.
pip install wheel
python setup.py sdist bdist_wheel

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

notify-on-failure:
name: Slack notify on failure
if: ${{ failure() }}
needs: [ release ]
runs-on: ubuntu-latest
steps:
- uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: 'danger'
SLACK_ICON_EMOJI: ':github:'
SLACK_MESSAGE: ${{ format('Failed to release {1}{3} {0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id, ':') }}
SLACK_TITLE: Release Failure
SLACK_USERNAME: GitHub Actions
SLACK_MSG_AUTHOR: twilio-dx
SLACK_FOOTER: Posted automatically using GitHub Actions
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
MSG_MINIMAL: true
50 changes: 50 additions & 0 deletions .github/workflows/tests.yml
This file contains hidden or 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,50 @@
name: Run Tests
on:
push:
branches: [ '*' ]
pull_request:
branches: [ main ]
schedule:
# Run automatically at 8AM PST Monday-Friday
- cron: '0 15 * * 1-5'
workflow_dispatch:

jobs:
tests:
name: Run Tests
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
python-version: [ '2.7', '3.5', '3.6', '3.7', '3.8', '3.9' ]
steps:
- name: Checkout sendgrid-python-smtpapi
uses: actions/checkout@v2
with:
fetch-depth: 0

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

- name: Build & Test
run: make install test-install test

notify-on-failure:
name: Slack notify on failure
if: ${{ failure() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}
needs: [ tests ]
runs-on: ubuntu-latest
steps:
- uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: 'danger'
SLACK_ICON_EMOJI: ':github:'
SLACK_MESSAGE: ${{ format('Failed running build on {1}{3} {0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id, ':') }}
SLACK_TITLE: Build Failure
SLACK_USERNAME: GitHub Actions
SLACK_MSG_AUTHOR: twilio-dx
SLACK_FOOTER: Posted automatically using GitHub Actions
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
MSG_MINIMAL: true
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions Makefile
This file contains hidden or 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
Expand Up @@ -2,6 +2,7 @@

venv:
@python --version || (echo "Python is not installed, please install Python 2 or Python 3"; exit 1);
pip install virtualenv
virtualenv --python=python venv

install: venv
Expand All @@ -13,6 +14,8 @@ test-install:
test:
. venv/bin/activate; python -m unittest discover -v
. venv/bin/activate; python test/__init__.py
. venv/bin/activate; flake8 --statistics --count
. venv/bin/activate; coverage run test/__init__.py

clean: nopyc
rm -rf venv
Expand Down
6 changes: 3 additions & 3 deletions README.rst
This file contains hidden or 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
Expand Up @@ -2,7 +2,7 @@
:target: https://www.sendgrid.com
:alt: SendGrid Logo

|Travis Badge| |Twitter Follow| |Codecov branch| |Python Versions| |PyPI Version| |GitHub contributors| |MIT Licensed|
|Tests Badge| |Twitter Follow| |Codecov branch| |Python Versions| |PyPI Version| |GitHub contributors| |MIT Licensed|

**This module helps build SendGrid's SMTP API headers.**

Expand Down Expand Up @@ -121,8 +121,8 @@ License
.. _Review Pull Requests: https://github.com/sendgrid/smtpapi-python/blob/HEAD/CONTRIBUTING.md#code-reviews)
.. _The MIT License (MIT): https://github.com/sendgrid/smtpapi-python/blob/HEAD/LICENSE

.. |Travis Badge| image:: https://travis-ci.com/sendgrid/smtpapi-python.svg?branch=main
:target: https://travis-ci.com/sendgrid/smtpapi-python
.. |Tests Badge| image:: https://github.com/sendgrid/smtpapi-python/actions/workflows/tests.yml/badge.svg
:target: https://github.com/sendgrid/smtpapi-python/actions/workflows/tests.yml
.. |Twitter Follow| image:: https://img.shields.io/twitter/follow/sendgrid.svg?style=social&label=Follow
:target: https://twitter.com/sendgrid
.. |Codecov branch| image:: https://img.shields.io/codecov/c/github/sendgrid/smtpapi-python/main.svg?style=flat-square&label=Codecov+Coverage
Expand Down
2 changes: 0 additions & 2 deletions test/__init__.py
This file contains hidden or 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
Expand Up @@ -106,12 +106,10 @@ def setUp(self):

self.required_files = [
'./Dockerfile',
'./.codeclimate.yml',
'./.env_sample',
'./ISSUE_TEMPLATE.md',
'./PULL_REQUEST_TEMPLATE.md',
'./.gitignore',
'./.travis.yml',
'./CHANGELOG.md',
'./CODE_OF_CONDUCT.md',
'./CONTRIBUTING.md',
Expand Down
8 changes: 0 additions & 8 deletions test/test_project.py
This file contains hidden or 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
Expand Up @@ -26,14 +26,6 @@ def test_env(self):
def test_gitignore(self):
self.assertTrue(os.path.isfile('./.gitignore'))

# ./.travis.yml
def test_travis(self):
self.assertTrue(os.path.isfile('./.travis.yml'))

# ./.codeclimate.yml
def test_codeclimate(self):
self.assertTrue(os.path.isfile('./.codeclimate.yml'))

# ./CHANGELOG.md
def test_changelog(self):
self.assertTrue(os.path.isfile('./CHANGELOG.md'))
Expand Down

Back | FazBrowse Home | New Git URL