Skip to content

Commit

Permalink
Run tests in CI (#5)
Browse files Browse the repository at this point in the history
* attempt to run tests in cicd

* add PAT

* update coverage reporting

* add coverage report to gitignore
  • Loading branch information
shapiromatron authored Feb 1, 2024
1 parent 121396f commit c481860
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
- name: Checkout bmds@next
uses: actions/checkout@v3
with:
repository: shapiromatron/bmds
repository: USEPA/bmds-private
path: venv
ref: next
lfs: true
token: ${{ secrets.USEPA_BMDS_PRIVATE_PAT }}
- uses: actions/setup-python@v4
with:
python-version: '3.11'
Expand Down Expand Up @@ -71,7 +71,6 @@ jobs:
run: |
export "LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH"
coverage run -m pytest --vcr-record=none
coverage html -d coverage_report
echo "# Python coverage report" >> $GITHUB_STEP_SUMMARY
coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
Expand Down Expand Up @@ -145,10 +144,10 @@ jobs:
- name: Checkout bmds@next
uses: actions/checkout@v3
with:
repository: shapiromatron/bmds
repository: USEPA/bmds-private
path: venv
ref: next
lfs: true
token: ${{ secrets.USEPA_BMDS_PRIVATE_PAT }}
- uses: actions/setup-python@v4
with:
python-version: '3.11'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
bmds_server/static/bundles/
build/
/data/
coverage_report/
dist/
docs/site/
node_modules/
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ test-integration-debug: ## Run integration tests in debug mode (requires npm ru
@playwright install --with-deps chromium
@INTEGRATION_TESTS=1 PWDEBUG=1 py.test -sv tests/integration/

coverage: ## Run test coverage
coverage run -m pytest
coverage html -d coverage_report
$(BROWSER) coverage_report/index.html

docs: ## Build documentation
cd docs; mkdocs build --strict

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[tool.coverage.run]
omit = [
"../bmds/*",
"./bmds_server/main/settings/*",
"./tests/*",
"./venv/*",
Expand Down

0 comments on commit c481860

Please sign in to comment.