Skip to content

Commit

Permalink
Merge pull request #65 from manheim/github_actions
Browse files Browse the repository at this point in the history
Github Actions for Test and Deploy / Update c7n and c7n_mailer versions
  • Loading branch information
jleopold28 authored Jan 24, 2022
2 parents 77a904e + 8dad57f commit 0061781
Show file tree
Hide file tree
Showing 15 changed files with 344 additions and 80 deletions.
157 changes: 157 additions & 0 deletions .github/workflows/pr.workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
name: Run Tests

on: # rebuild any PR changes
pull_request:
branches: [ master ]
jobs:
test-py37:
env:
TOXENV: py37
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.7'
architecture: 'x64'
- run: pip install virtualenv
- run: virtualenv --version
- run: git config --global user.email "man-releaseengineering@manheim.com"
- run: git config --global user.name "Manheim RE"
- run: pip install tox
- run: pip install codecov
- run: pip freeze
- run: virtualenv --version
- run: tox -r
- run: codecov
test-py38:
env:
TOXENV: py38
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
architecture: 'x64'
- run: pip install virtualenv
- run: virtualenv --version
- run: git config --global user.email "man-releaseengineering@manheim.com"
- run: git config --global user.name "Manheim RE"
- run: pip install tox
- run: pip install codecov
- run: pip freeze
- run: virtualenv --version
- run: tox -r
- run: codecov
test-py39:
env:
TOXENV: py39
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- run: pip install virtualenv
- run: virtualenv --version
- run: git config --global user.email "man-releaseengineering@manheim.com"
- run: git config --global user.name "Manheim RE"
- run: pip install tox
- run: pip install codecov
- run: pip freeze
- run: virtualenv --version
- run: tox -r
- run: codecov
test-docs:
env:
TOXENV: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- run: pip install virtualenv
- run: virtualenv --version
- run: git config --global user.email "man-releaseengineering@manheim.com"
- run: git config --global user.name "Manheim RE"
- run: pip install tox
- run: pip install codecov
- run: pip freeze
- run: virtualenv --version
- run: tox -r
- run: codecov
test-docker:
env:
TOXENV: docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- run: pip install virtualenv
- run: virtualenv --version
- run: git config --global user.email "man-releaseengineering@manheim.com"
- run: git config --global user.name "Manheim RE"
- run: pip install tox
- run: pip install codecov
- run: pip freeze
- run: virtualenv --version
- run: tox -r
- run: codecov
pypi-build:
needs: [test-py37, test-py38, test-py39, test-docs, test-docker]
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- run: pip install virtualenv
- run: virtualenv --version
- run: git config --global user.email "man-releaseengineering@manheim.com"
- run: git config --global user.name "Manheim RE"
- run: pip install tox
- run: pip install codecov
- run: pip install wheel
- run: pip freeze
- run: virtualenv --version
- run: bash build_or_deploy.sh build
dockerhub-build:
needs: [pypi-build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: manheim/manheim-c7n-tools
- name: Build Docker image
uses: docker/build-push-action@v2
with:
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

158 changes: 158 additions & 0 deletions .github/workflows/release.workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
name: Run Tests and Release

on: # Build and release when creating new tags
push:
tags:
- '*'
jobs:
test-py37:
env:
TOXENV: py37
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.7'
architecture: 'x64'
- run: pip install virtualenv
- run: virtualenv --version
- run: git config --global user.email "man-releaseengineering@manheim.com"
- run: git config --global user.name "Manheim RE"
- run: pip install tox
- run: pip install codecov
- run: pip freeze
- run: virtualenv --version
- run: tox -r
- run: codecov
test-py38:
env:
TOXENV: py38
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
architecture: 'x64'
- run: pip install virtualenv
- run: virtualenv --version
- run: git config --global user.email "man-releaseengineering@manheim.com"
- run: git config --global user.name "Manheim RE"
- run: pip install tox
- run: pip install codecov
- run: pip freeze
- run: virtualenv --version
- run: tox -r
- run: codecov
test-py39:
env:
TOXENV: py39
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- run: pip install virtualenv
- run: virtualenv --version
- run: git config --global user.email "man-releaseengineering@manheim.com"
- run: git config --global user.name "Manheim RE"
- run: pip install tox
- run: pip install codecov
- run: pip freeze
- run: virtualenv --version
- run: tox -r
- run: codecov
test-docs:
env:
TOXENV: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- run: pip install virtualenv
- run: virtualenv --version
- run: git config --global user.email "man-releaseengineering@manheim.com"
- run: git config --global user.name "Manheim RE"
- run: pip install tox
- run: pip install codecov
- run: pip freeze
- run: virtualenv --version
- run: tox -r
- run: codecov
test-docker:
env:
TOXENV: docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- run: pip install virtualenv
- run: virtualenv --version
- run: git config --global user.email "man-releaseengineering@manheim.com"
- run: git config --global user.name "Manheim RE"
- run: pip install tox
- run: pip install codecov
- run: pip freeze
- run: virtualenv --version
- run: tox -r
- run: codecov
pypi-deploy:
needs: [test-py37, test-py38, test-py39, test-docs, test-docker]
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- run: pip install virtualenv
- run: virtualenv --version
- run: git config --global user.email "man-releaseengineering@manheim.com"
- run: git config --global user.name "Manheim RE"
- run: pip install tox
- run: pip install codecov
- run: pip install wheel
- run: pip freeze
- run: virtualenv --version
- run: bash build_or_deploy.sh build
- run: bash build_or_deploy.sh push
dockerhub-push:
needs: [pypi-deploy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: manheim/manheim-c7n-tools
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
61 changes: 0 additions & 61 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Changelog
=========

1.4.0 (2022-01-20)
------------------

* Bump c7n to release 0.9.14
* Bump c7n-mailer to release 0.6.13
* Updated dependencies for c7n and c7n-mailer
* Remove version contstrains for ``docutils``
* Pin ``mistune==0.8.4`` for docs
* Replace TravisCI with Github Actions


1.3.1 (2021-06-14)
------------------
Expand Down
Loading

0 comments on commit 0061781

Please sign in to comment.