Skip to content

Commit

Permalink
[IT-3241] Copy coverage and periodic changes (#40)
Browse files Browse the repository at this point in the history
Copy the changes from lambda-template related to running a coverage
report of the unit tests and running the unit tests periodically to
validate our dependencies.
  • Loading branch information
jesusaurus committed Oct 18, 2023
1 parent a6ea8be commit 3e92dc7
Show file tree
Hide file tree
Showing 6 changed files with 317 additions and 185 deletions.
5 changes: 5 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[run]
relative_files = True

# Use 'source' instead of 'omit' in order to ignore 'tests/unit/__init__.py'
source = set_tags
11 changes: 11 additions & 0 deletions .github/workflows/periodic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: periodic

on:
# Run once a month
schedule:
- cron: '30 16 15 * *' # 16:30 UTC (9:30 PST) on the 15th of the month

jobs:
# Check that our current dependencies still work
dependency-check:
uses: "./.github/workflows/test.yaml"
4 changes: 3 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:
python-version: 3.8
- run: pip install -U pipenv
- run: pipenv install --dev
- run: pipenv run python3 -m pytest tests/ -vv
- run: pipenv run coverage run -m pytest tests/ -svv
- name: upload coverage to coveralls
uses: coverallsapp/github-action@v2

sam-build-and-lint:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ requests-mock = "~=1.10"
pytest = "~=6.0"
pytest-mock = "~=3.3"
boto3 = "~=1.17"
coverage = "~=7.0"

[packages]
crhelper = "~=2.0"
Expand Down
Loading

0 comments on commit 3e92dc7

Please sign in to comment.