File tree Expand file tree Collapse file tree 8 files changed +23
-15
lines changed
Expand file tree Collapse file tree 8 files changed +23
-15
lines changed Original file line number Diff line number Diff line change 1- name : Python package
1+ name : Test Suite
22
3- on : [push]
3+ on :
4+ push :
5+ branches : ["master"]
6+ pull_request :
7+ branches : ["master"]
48
59jobs :
610 linters :
2024 python -m pip install --upgrade pip
2125 pip install -r requirements.txt
2226 pip install -r tests/test-requirements.txt
23- - name : Mypy
24- run : mypy piccolo tests
25- - name : Flake8
26- run : flake8 piccolo tests
27+ - name : Lint
28+ run : ./scripts/lint.sh
2729
2830 postgres :
2931 runs-on : ubuntu-latest
7072 psql -h localhost -c "CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";" -d piccolo -U postgres
7173
7274 - name : Test with pytest, Postgres
73- run : cd tests && . /test-postgres.sh
75+ run : ./scripts /test-postgres.sh
7476 env :
7577 PG_HOST : localhost
7678 PG_DATABASE : piccolo
9496 pip install -r requirements.txt
9597 pip install -r tests/test-requirements.txt
9698 - name : Test with pytest, SQLite
97- run : cd tests && . /test-sqlite.sh
99+ run : ./scripts /test-sqlite.sh
Original file line number Diff line number Diff line change 1+ # Development Scripts
2+
3+ The scripts follow GitHub's [ "Scripts to Rule Them All"] ( https://github.com/github/scripts-to-rule-them-all ) .
4+
5+ * ` scripts/coverage-report.sh ` - Generate coverage report.
6+ * ` scripts/lint.sh ` - Run the automated code linting/formatting tools.
7+ * ` scripts/release.sh ` - Publish package to PYPI.
8+ * ` scripts/test-postgres.sh ` - Run the test suite with Postgres.
9+ * ` scripts/test-sqlite.sh ` - Run the test suite with Sqlite.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ mypy piccolo tests
4+ flake8 piccolo tests
File renamed without changes.
Original file line number Diff line number Diff line change 44# To run all in a class tests/test_foo.py::TestFoo
55# To run a single test tests/test_foo.py::TestFoo::test_foo
66
7- cd ..
8-
97export PICCOLO_CONF=" tests.postgres_conf"
108python -m pytest --cov=piccolo -s $@
Original file line number Diff line number Diff line change 44# To run all in a class tests/test_foo.py::TestFoo
55# To run a single test tests/test_foo.py::TestFoo::test_foo
66
7- cd ..
8-
97export PICCOLO_CONF=" tests.sqlite_conf"
108python -m pytest --cov=piccolo -s $@
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments