-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from manheim/github_actions
Github Actions for Test and Deploy / Update c7n and c7n_mailer versions
- Loading branch information
Showing
15 changed files
with
344 additions
and
80 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,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 }} | ||
|
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,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 }} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.