Skip to content

Commit

Permalink
Python ~> 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
amancevice committed Jan 9, 2024
1 parent ffd8e6a commit dc46377
Show file tree
Hide file tree
Showing 8 changed files with 181 additions and 195 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
- uses: amancevice/setup-code-climate@v1
with:
cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }}
Expand Down
11 changes: 4 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
all: test validate

clean:
rm -rf .terraform*
make -C example clean
make -C python clean

test:
make -C python test

validate: | .terraform
terraform fmt -check
AWS_REGION=us-east-1 terraform validate
validate:
#terraform fmt -check
make -C example validate

.PHONY: test validate

.terraform:
terraform init
15 changes: 14 additions & 1 deletion example/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
BUCKET := us-west-2-serverless-pypi
ENDPOINT := $(shell terraform output -raw endpoint)

all: validate

clean:
rm -rf .terraform*

curl:
curl -s $(ENDPOINT)requests-iamauth/ | prettier --parser html | bat -l html

Expand All @@ -17,7 +22,15 @@ ls:
upload: requests_iamauth-0.7.0-py3-none-any.whl
aws s3 cp $< s3://$(BUCKET)/requests-iamauth/$<

.PHONY: curl logs ls upload
validate: | .terraform
terraform fmt -check
AWS_REGION=us-east-1 terraform validate

.PHONY: all curl logs ls upload validate

requests_iamauth-%-py3-none-any.whl:
pip download --no-deps requests-iamauth==$*

.terraform: ../*.tf
terraform init
touch $@
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ terraform {

aws = {
source = "hashicorp/aws"
version = "~> 5.0"
version = "~> 5.31"
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions python/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
all: test

clean:
rm -rf .venv
pipenv --rm

test: .venv
test: Pipfile.lock
pipenv run black --check index.py index_test.py
pipenv run pytest

Expand All @@ -12,6 +12,9 @@ up: .env

.PHONY: all clean test up

Pipfile.lock: Pipfile | .venv
pipenv lock

.venv: Pipfile
mkdir -p $@
pipenv install --dev
Expand Down
3 changes: 0 additions & 3 deletions python/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ pytest-cov = "*"

[packages]
boto3 = "*"

[requires]
python_version = "3.11"
334 changes: 155 additions & 179 deletions python/Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ variable "lambda_reindex_timeout" {

variable "lambda_runtime" {
description = "Lambda runtime"
default = "python3.11"
default = "python3.12"
}

variable "log_group_api_retention_in_days" {
Expand Down

0 comments on commit dc46377

Please sign in to comment.