Skip to content

chore: migrate non-integ CI to GitHub Actions workflows #233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/ci_decrypt-oracle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Continuous Integration tests for the decrypt oracle

on:
pull_request:
push:
# Run once a day
schedule:
- cron: '0 0 * * *'

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
# The oracle runs in a Python 3.6 Lamba
python-version: 3.6
- run: |
python -m pip install --upgrade pip
pip install --upgrade -r ci-requirements.txt
- name: run test
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surprised there isn't a tox action yet...

env:
TOXENV: local
run: |
cd decrypt_oracle
tox -- -vv
static-analysis:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
category:
- bandit
- readme
- flake8
- pylint
- flake8-tests
- pylint-tests
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.x
- run: |
python -m pip install --upgrade pip
pip install --upgrade -r ci-requirements.txt
- name: run test
env:
TOXENV: ${{ matrix.category }}
run: |
cd decrypt_oracle
tox -- -vv
40 changes: 40 additions & 0 deletions .github/workflows/ci_static-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Static analysis checks

on:
pull_request:
push:
# Run once a day
schedule:
- cron: '0 0 * * *'

jobs:
analysis:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
category:
- bandit
- doc8
- docs
- readme
- flake8
- pylint
- flake8-tests
- pylint-tests
- flake8-examples
- pylint-examples
- black-check
- isort-check
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.x
- run: |
python -m pip install --upgrade pip
pip install --upgrade -r ci-requirements.txt
- name: run test
env:
TOXENV: ${{ matrix.category }}
run: tox -- -vv
88 changes: 88 additions & 0 deletions .github/workflows/ci_test-vector-handler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Continuous Integration tests for the test vector handler

on:
pull_request:
push:
# Run once a day
schedule:
- cron: '0 0 * * *'

jobs:
tests:
# Until we address the credentials problem,
# do not run for pull requests.
if: github.event != 'pull_request'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
python:
- 2.7
- 3.5
- 3.6
- 3.7
- 3.8
- 3.x
architecture:
- x64
- x86
category:
- awses_1.3.3
- awses_1.3.max
- awses_latest
exclude:
# x86 builds are only meaningful for Windows
- os: ubuntu-latest
architecture: x86
- os: macos-latest
architecture: x86
steps:
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.INTEG_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.INTEG_AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}
- run: |
python -m pip install --upgrade pip
pip install --upgrade -r ci-requirements.txt
- name: run test
env:
TOXENV: ${{ matrix.category }}
run: |
cd test_vector_handlers
tox -- -vv
static-analysis:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
category:
- bandit
- readme
- flake8
- pylint
- flake8-tests
- pylint-tests
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.x
- run: |
python -m pip install --upgrade pip
pip install --upgrade -r ci-requirements.txt
- name: run test
env:
TOXENV: ${{ matrix.category }}
run: |
cd test_vector_handlers
tox -- -vv
100 changes: 100 additions & 0 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Continuous Integration tests

on:
pull_request:
push:
# Run once a day
schedule:
- cron: '0 0 * * *'

env:
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: |
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assuming these are the creds already out in the wild...they aren't in the travis file

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're CMK ARNs not creds, but for Travis and Appveyor they're set through the global environment variable settings via the web UI.

AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: |
arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2

jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
python:
- 2.7
- 3.5
- 3.6
- 3.7
- 3.8
- 3.x
architecture:
- x64
- x86
category:
- local
- accept
# These require credentials.
# Enable them once we sort how to provide them.
# - integ
# - examples
exclude:
# x86 builds are only meaningful for Windows
- os: ubuntu-latest
architecture: x86
- os: macos-latest
architecture: x86
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool

- run: |
python -m pip install --upgrade pip
pip install --upgrade -r ci-requirements.txt
- name: run test
env:
TOXENV: ${{ matrix.category }}
run: tox -- -vv
upstream-py3:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
category:
- nocmk
- test-upstream-requirements-py37
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.7
- run: |
python -m pip install --upgrade pip
pip install --upgrade -r ci-requirements.txt
- name: run test
env:
TOXENV: ${{ matrix.category }}
run: tox -- -vv
upstream-py2:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
category:
- test-upstream-requirements-py27
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 2.7
- run: |
python -m pip install --upgrade pip
pip install --upgrade -r ci-requirements.txt
- name: run test
env:
TOXENV: ${{ matrix.category }}
run: tox -- -vv
Loading