Skip to content

Commit b6c4d62

Browse files
committed
chore(CI): migrate CB CI jobs to GHA
1 parent d3e702e commit b6c4d62

File tree

3 files changed

+134
-0
lines changed

3 files changed

+134
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow runs code coverage checks.
2+
name: Code Coverage
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- master
9+
# Run once a day
10+
schedule:
11+
- cron: '0 0 * * *'
12+
13+
jobs:
14+
coverage:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: '3.12' # Using latest Python version
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install "tox < 4.0"
28+
pip install -r dev_requirements/coverage-requirements.txt
29+
30+
- name: Run coverage tests
31+
env:
32+
TOXENV: "coverage"
33+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: "arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f"
34+
run: tox
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Python Examples Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
examples:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: ['3.8.12', '3.9.7', '3.10.0', '3.11.0', '3.12.0']
16+
include:
17+
- python-version: '3.8.12'
18+
tox-env: 'py38-examples'
19+
- python-version: '3.9.7'
20+
tox-env: 'py39-examples'
21+
- python-version: '3.10.0'
22+
tox-env: 'py310-examples'
23+
- python-version: '3.11.0'
24+
tox-env: 'py311-examples'
25+
- python-version: '3.12.0'
26+
tox-env: 'py312-examples'
27+
28+
env:
29+
TOXENV: ${{ matrix.tox-env }}
30+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
31+
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
32+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
33+
arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2
34+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >-
35+
arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7
36+
37+
steps:
38+
- uses: actions/checkout@v3
39+
40+
- name: Set up Python ${{ matrix.python-version }}
41+
uses: actions/setup-python@v4
42+
with:
43+
python-version: ${{ matrix.python-version }}
44+
45+
- name: Install dependencies
46+
run: |
47+
python -m pip install --upgrade pip
48+
pip install "tox < 4.0"
49+
50+
- name: Run examples tests with tox
51+
run: tox
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Python Integration Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
integration:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: ['3.8.12', '3.9.7', '3.10.0', '3.11.0', '3.12.0']
16+
include:
17+
- python-version: '3.8.12'
18+
tox-env: 'py38-integ'
19+
- python-version: '3.9.7'
20+
tox-env: 'py39-integ'
21+
- python-version: '3.10.0'
22+
tox-env: 'py310-integ'
23+
- python-version: '3.11.0'
24+
tox-env: 'py311-integ'
25+
- python-version: '3.12.0'
26+
tox-env: 'py312-integ'
27+
28+
env:
29+
TOXENV: ${{ matrix.tox-env }}
30+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
31+
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
32+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >-
33+
arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7
34+
35+
steps:
36+
- uses: actions/checkout@v3
37+
38+
- name: Set up Python ${{ matrix.python-version }}
39+
uses: actions/setup-python@v4
40+
with:
41+
python-version: ${{ matrix.python-version }}
42+
43+
- name: Install dependencies
44+
run: |
45+
python -m pip install --upgrade pip
46+
pip install "tox < 4.0"
47+
48+
- name: Run integration tests with tox
49+
run: tox

0 commit comments

Comments
 (0)