Skip to content

Commit aab6084

Browse files
committed
add codecov step to tests.yaml
1 parent 23e30c0 commit aab6084

File tree

6 files changed

+13
-5
lines changed

6 files changed

+13
-5
lines changed

.github/workflows/tests.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ jobs:
7777
PG_HOST: localhost
7878
PG_DATABASE: piccolo
7979
PG_PASSWORD: postgres
80+
- name: Upload coverage
81+
uses: codecov/codecov-action@v1
82+
if: matrix.python-version == '3.7'
8083

8184
sqlite:
8285
runs-on: ubuntu-latest

scripts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ The scripts follow GitHub's ["Scripts to Rule Them All"](https://github.com/gith
44

55
Call them from the root of the project, e.g. `./scripts/lint.sh`.
66

7-
* `scripts/coverage-report.sh` - Generate coverage report.
87
* `scripts/lint.sh` - Run the automated code linting/formatting tools.
98
* `scripts/release.sh` - Publish package to PyPI.
9+
* `scripts/tests.sh` - General script to run tests and generate coverage report. It's used in the following scripts.
1010
* `scripts/test-postgres.sh` - Run the test suite with Postgres.
1111
* `scripts/test-sqlite.sh` - Run the test suite with SQLite.
1212
* `scripts/piccolo.sh` - Run the Piccolo CLI on the example project in the `tests` folder.

scripts/coverage-report.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

scripts/test-postgres.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# To run a single test tests/test_foo.py::TestFoo::test_foo
66

77
export PICCOLO_CONF="tests.postgres_conf"
8-
python -m pytest --cov=piccolo -s $@
8+
./tests.sh

scripts/test-sqlite.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# To run a single test tests/test_foo.py::TestFoo::test_foo
66

77
export PICCOLO_CONF="tests.sqlite_conf"
8-
python -m pytest --cov=piccolo -s $@
8+
./tests.sh

scripts/tests.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
# To run all in a folder tests/
3+
# To run all in a file tests/test_foo.py
4+
# To run all in a class tests/test_foo.py::TestFoo
5+
# To run a single test tests/test_foo.py::TestFoo::test_foo
6+
7+
python -m pytest --cov=piccolo --cov-report xml --cov-report html --cov-fail-under 75 -s $@

0 commit comments

Comments
 (0)