From 70023febefaf04dd6eaff501a2128a855448bd38 Mon Sep 17 00:00:00 2001 From: mattsb42-aws Date: Tue, 7 Jan 2020 18:55:41 -0800 Subject: [PATCH 1/2] add local tests and static analysis workflows --- .github/workflows/local-tests.yaml | 43 ++++++++++++++++++++++++++ .github/workflows/static-analysis.yaml | 39 +++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 .github/workflows/local-tests.yaml create mode 100644 .github/workflows/static-analysis.yaml diff --git a/.github/workflows/local-tests.yaml b/.github/workflows/local-tests.yaml new file mode 100644 index 00000000..aa963f15 --- /dev/null +++ b/.github/workflows/local-tests.yaml @@ -0,0 +1,43 @@ +name: Local Tests + +on: [pull_request] + +jobs: + tests: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: + - ubuntu-latest + - windows-latest + - macos-latest + python: + - 2.7 + - 3.4 + - 3.5 + - 3.6 + - 3.7 + - 3.8 + - 3.x + categories: + - local-slow + # x86 builds are only meaningful for Windows + exclude: + - 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 }} + - run: | + python -m pip install --upgrade pip + pip install --upgrade tox + - name: run test + env: + TOXENV: ${{ matrix.category }} + run: tox -- -vv diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml new file mode 100644 index 00000000..052d15d3 --- /dev/null +++ b/.github/workflows/static-analysis.yaml @@ -0,0 +1,39 @@ +name: Static Analysis Checks + +on: [pull_request] + +jobs: + analysis: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + category: + - bandit + - doc8 + - readme + - docs + - flake8-examples + - pylint-examples + # Disabled pending completion of cleanup + # https://github.com/aws/aws-dynamodb-encryption-python/issues/67 +# - flake8 +# - pylint +# - flake8-tests +# - pylint-tests + # Disabled pending completion of integration + # https://github.com/aws/aws-dynamodb-encryption-python/issues/66 +# - mypy-py2 +# - mypy-py3 + 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 tox + - name: check + env: + TOXENV: ${{ matrix.category }} + run: tox -- -vv From b5dcb5ee06e2b8d3826e94de737aaa0dc7b6022e Mon Sep 17 00:00:00 2001 From: mattsb42-aws Date: Wed, 8 Jan 2020 13:34:58 -0800 Subject: [PATCH 2/2] add integ test workflow --- .github/workflows/integ-tests.yaml | 50 ++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/integ-tests.yaml diff --git a/.github/workflows/integ-tests.yaml b/.github/workflows/integ-tests.yaml new file mode 100644 index 00000000..4eb840b0 --- /dev/null +++ b/.github/workflows/integ-tests.yaml @@ -0,0 +1,50 @@ +name: Local Tests + +# For now, just run these on every PR for consistency. +# Later we'll probably move these to only run on promotion PRs. +on: [pull_request] + +jobs: + tests: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: + - ubuntu-latest + - windows-latest + - macos-latest + python: + - 2.7 + - 3.4 + - 3.5 + - 3.6 + - 3.7 + - 3.8 + - 3.x + categories: + - integ-slow + # x86 builds are only meaningful for Windows + exclude: + - 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 }} + - uses: aws-actions/configure-aws-credentials@v1.0.1 + 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 + - run: | + python -m pip install --upgrade pip + pip install --upgrade tox + - name: run test + env: + TOXENV: ${{ matrix.category }} + run: tox -- -vv