Skip to content

Commit

Permalink
[IT-3547] Periodic updates (#21)
Browse files Browse the repository at this point in the history
Update dependencies and Python version.

Don't regenerate Pipfile.lock during tests.

Explicitly generate an LCOV file to pass to Coveralls, and don't
fail the test if coveralls gives an error.
  • Loading branch information
jesusaurus authored Sep 25, 2024
1 parent 3733380 commit c75ce9e
Show file tree
Hide file tree
Showing 7 changed files with 1,012 additions and 1,049 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@v4
with:
python-version: 3.8
python-version: 3.11
- run: pip install -U pipenv
shell: bash

Expand Down
11 changes: 8 additions & 3 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@v4
with:
python-version: 3.8
python-version: 3.11
- uses: pre-commit/[email protected]

pytest:
Expand All @@ -23,12 +23,17 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11
- run: pip install -U pipenv
- run: pipenv install --dev
- run: pipenv sync --dev
- run: pipenv run pip freeze
- 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:
runs-on: ubuntu-latest
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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-ast
- repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
rev: v1.35.1
hooks:
- id: yamllint
- repo: https://github.com/awslabs/cfn-python-lint
rev: v0.56.0
rev: v1.14.2
hooks:
- id: cfn-python-lint
files: template\.(json|yml|yaml)$
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.10
rev: v1.5.5
hooks:
- id: remove-tabs
6 changes: 3 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
pytest = "~=6.0"
pytest = "~=8.3"
pytest-mock = "~=3.3"
pre-commit = "~=2.15"
pre-commit = "~=3.5"
aws-sam-cli = "~=1.35"
awscli = "~=1.22"
coverage = "~=7.0"

[requires]
python_version = "3.8"
python_version = "3.11"
2,031 changes: 994 additions & 1,037 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Resources:
Properties:
CodeUri: .
Handler: submit_job/app.lambda_handler
Runtime: python3.8
Runtime: python3.11
Role: !GetAtt FunctionRole.Arn
Environment:
Variables:
Expand Down

0 comments on commit c75ce9e

Please sign in to comment.