Skip to content
Open
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pre-commit

on:
pull_request:
push:
branches: [main, feature]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
44 changes: 44 additions & 0 deletions .github/workflows/test-integration-localstack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: test-integration-localstack

on:
pull_request:
branches: [master, feature]

env:
AWS_DEFAULT_REGION: eu-west-1
AWS_REGION: eu-west-1
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
architecture: "x64"
- name: Install dependencies
run: |
pip install -r requirements-dev.txt
- name: Start LocalStack
run: |
pip install localstack awscli-local[ver1]
docker pull localstack/localstack
localstack start -d

echo "Waiting for LocalStack startup..."
localstack wait -t 30
echo "Startup complete"
- name: Deploy infrastructure
run: |
bin/deploy.sh
- name: Run integration tests against LocalStack
run: |
python -m pytest tests/integration
- name: Show localstack logs
if: always()
run: |
localstack logs
24 changes: 24 additions & 0 deletions .github/workflows/test-unit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: test-unit

on:
pull_request:
branches: [master, feature]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
architecture: "x64"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Test with unittest
run: |
python -m unittest discover -s tests/unit -v
Empty file modified bin/deploy.sh
100644 → 100755
Empty file.
53 changes: 53 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
astroid==3.0.1
awscli-local==0.21.1
black==23.11.0
boto3==1.29.3
boto3-stubs==1.29.3
botocore==1.32.3
botocore-stubs==1.32.3.post1
certifi==2023.11.17
cfgv==3.4.0
charset-normalizer==3.3.2
click==8.1.7
codecov==2.1.13
commit-linter==1.0.3
coverage==7.3.2
dill==0.3.7
distlib==0.3.7
exceptiongroup==1.2.0
filelock==3.13.1
flake8==6.1.0
identify==2.5.32
idna==3.4
iniconfig==2.0.0
isort==5.12.0
jmespath==1.0.1
localstack-client==2.5
mccabe==0.7.0
mypy==1.7.0
mypy-boto3==1.29.3
mypy-boto3-dynamodb==1.29.0
mypy-extensions==1.0.0
nodeenv==1.8.0
packaging==23.2
pathspec==0.11.2
platformdirs==3.11.0
pluggy==1.3.0
pre-commit==3.5.0
pycodestyle==2.11.1
pyflakes==3.1.0
pylint==3.0.2
pytest==7.4.3
python-dateutil==2.8.2
PyYAML==6.0.1
requests==2.31.0
s3transfer==0.7.0
six==1.16.0
tomli==2.0.1
tomlkit==0.12.3
types-awscrt==0.19.13
types-requests==2.31.0.10
types-s3transfer==0.7.0
typing_extensions==4.8.0
urllib3==2.0.7
virtualenv==20.24.6