Skip to content

Commit

Permalink
Maintenance: backport updates (#35)
Browse files Browse the repository at this point in the history
* Update default Python version to 3.12

* Respect Pipfile.lock versions in testing.

* Fix coverage-coveralls integration
  • Loading branch information
jesusaurus authored Sep 25, 2024
1 parent b1e7ace commit bd930e9
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/actions/sam-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
# Convert Pipfile.lock to requirements.txt for sam
- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.12
- run: pip install -U pipenv
shell: bash

Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.12
- uses: pre-commit/[email protected]

pytest:
Expand All @@ -23,13 +23,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.12
- run: pip install -U pipenv
- run: pipenv install --dev
- run: pipenv run coverage run -m pytest tests/ -vv
- run: pipenv sync --dev
- run: pipenv run coverage run -m pytest tests/ -svv
- run: pipenv run coverage lcov
- name: upload coverage to coveralls
uses: coverallsapp/github-action@v2
with:
file: coverage.lcov
fail-on-error: false

sam-build-and-lint:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
coverage.lcov

# Translations
*.mo
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ coverage = "~=7.3"
crhelper = "~=2.0"

[requires]
python_version = "3.9"
python_version = "3.12"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Install the following applications:
* [pipenv](https://github.com/pypa/pipenv)

### Install Requirements
Run `pipenv install --dev` to install both production and development
Run `pipenv sync --dev` to install both production and development
requirements, and `pipenv shell` to activate the virtual environment. For more
information see the [pipenv docs](https://pipenv.pypa.io/en/latest/).

Expand Down Expand Up @@ -65,7 +65,7 @@ managed with `pipenv`. Install the development dependencies and run the tests
using `coverage`.

```shell script
$ pipenv run coverage run -m pytest tests/ -vv
$ pipenv run coverage run -m pytest tests/ -svv
```

Automated testing will upload coverage results to [Coveralls](coveralls.io).
Expand Down
2 changes: 1 addition & 1 deletion template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Resources:
Properties:
CodeUri: .
Handler: hello_world/app.lambda_handler
Runtime: python3.9
Runtime: python3.12
Role: !GetAtt FunctionRole.Arn
Events:
HelloWorld:
Expand Down

0 comments on commit bd930e9

Please sign in to comment.